getpocket

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 9 Imported by: 0

README

getpocket

This is a golang library for working with the getpocket service. At the moment, it provides only one function: Retrive, which returns a list of links from an unread list.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSomethingWentWrong = errors.New("Something Went Wrong")
)

Functions

This section is empty.

Types

type Pocket

type Pocket struct {
	ConsumerKey string `json:"consumer_key"`
	AccessToken string `json:"access_token"`
	State       string `json:"state"`
	DetailType  string `json:"detailType"`
	Count       int    `json:"count"`
	Offset      int    `json:"offset"`
	Total       int    `json:"total"`
	// contains filtered or unexported fields
}

func New

func New(consumerKey, accessToken string) (*Pocket, error)

New creates a new pocket instance with the given consumer key and access token.

func (*Pocket) Retrive

func (p *Pocket) Retrive(since int64) ([]PocketItem, int64, error)

type PocketItem added in v0.0.2

type PocketItem struct {
	ID                     string            `json:"item_id"`
	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"`
	Tags                   map[string]string `json:"tags"`
	TopImageURL            string            `json:"top_image_url"`
	ResolvedID             string            `json:"resolved_id"`
	GivenURL               string            `json:"given_url"`
	GivenTitle             string            `json:"given_title"`
	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"`
	ListenDurationEstimate int               `json:"listen_duration_estimate"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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