Documentation
¶
Index ¶
- type Action
- type Client
- func (client *Client) CreateAuthLink(requestToken string) string
- func (client *Client) GetAccessToken(requestToken string) (accessToken string, err error)
- func (client *Client) GetLinks(state LinkState) (response ItemLists, err error)
- func (client *Client) ModifyLink(action Action, itemID string) (ok bool, err error)
- func (client *Client) ObtainRequestToken() (code string, err error)
- type Item
- type ItemLists
- type LinkState
- type Settings
- type Widget
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 pocket client Documention at https://getpocket.com/developer/docs/overview
func (*Client) CreateAuthLink ¶
CreateAuthLink create authorization link to redirect the user to
func (*Client) GetAccessToken ¶
GetAccessToken exchange request token for accesstoken
func (*Client) GetLinks ¶
GetLinks retrieve links of a given states https://getpocket.com/developer/docs/v3/retrieve
func (*Client) ModifyLink ¶
ModifyLink change the state of the link
func (*Client) ObtainRequestToken ¶
ObtainRequestToken get request token to be used in the auth workflow
type Item ¶
type Item struct { ItemID string `json:"item_id"` ResolvedID string `json:"resolved_id"` GivenURL string `json:"given_url"` GivenTitle string `json:"given_title"` Favorite string `json:"favorite"` Status string `json:"status"` TimeAdded string `json:"time_added"` TimeUpdated string `json:"time_updated"` TimeRead string `json:"time_read"` TimeFavorited string `json:"time_favorited"` SortID int `json:"sort_id"` ResolvedTitle string `json:"resolved_title"` ResolvedURL string `json:"resolved_url"` Excerpt string `json:"excerpt"` IsArticle string `json:"is_article"` IsIndex string `json:"is_index"` HasVideo string `json:"has_video"` HasImage string `json:"has_image"` WordCount string `json:"word_count"` Lang string `json:"lang"` TimeToRead int `json:"time_to_read"` TopImageURL string `json:"top_image_url"` ListenDurationEstimate int `json:"listen_duration_estimate"` }
Item represents link in pocket api
type ItemLists ¶
type ItemLists struct { Status int `json:"status"` Complete int `json:"complete"` List map[string]Item `json:"list"` Since int `json:"since"` }
ItemLists represent list of links
type LinkState ¶
type LinkState string
LinkState represents link states to be retrieved According to the api https://getpocket.com/developer/docs/v3/retrieve there are 3 states:
1-archive 2-unread 3-all
however archive does not really well work and returns links that are in the unread list buy inspecting getpocket I found out that there is an undocumanted read state