pocket

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 7 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
}

func NewClient

func NewClient(consumerKey, accessToken string) *Client

func (*Client) AddURL

func (c *Client) AddURL(entryURL, entryTitle string) error

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