pocket

package
v1.0.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a Pocket client.

func NewClient

func NewClient(consumerKey, accessToken string) *Client

NewClient returns a new Pocket client.

func (*Client) AddURL

func (c *Client) AddURL(link, title string) error

AddURL sends a single link to Pocket.

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector manages the authorization flow with Pocket to get a personal access token.

func NewConnector

func NewConnector(consumerKey string) *Connector

NewConnector returns a new Pocket Connector.

func (*Connector) AccessToken

func (c *Connector) AccessToken(requestToken string) (string, error)

AccessToken fetches a new access token once the end-user authorized the application.

func (*Connector) AuthorizationURL

func (c *Connector) AuthorizationURL(requestToken, redirectURL string) string

AuthorizationURL returns the authorization URL for the end-user.

func (*Connector) RequestToken

func (c *Connector) RequestToken(redirectURL string) (string, error)

RequestToken fetches a new request token from Pocket API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL