Documentation ¶
Index ¶
- Constants
- Variables
- type Add
- type AddResponse
- type Item
- type ItemAuthor
- type ItemImage
- type ItemTag
- type ItemVideo
- type Modify
- type ModifyResponse
- type Retrieve
- func (c *Retrieve) Exec(user auth.Authenticated) (*RetrieveResponse, error)
- func (c *Retrieve) SetConsumerKey(consumerKey string)
- func (c *Retrieve) SetContentType(contentType string) error
- func (c *Retrieve) SetDetailType(detailType string) error
- func (c *Retrieve) SetFavorite(favorite bool) *Retrieve
- func (c *Retrieve) SetRequest(request utils.HttpRequest)
- func (c *Retrieve) SetSort(sort string) error
- func (c *Retrieve) SetState(state string) error
- func (c *Retrieve) SetTag(tag string) *Retrieve
- func (c *Retrieve) SetUntagged() *Retrieve
- type RetrieveItem
- type RetrieveResponse
Constants ¶
View Source
const ( STATE_UNREAD = "unread" STATE_ARCHIVE = "archive" STATE_ALL = "all" TAG_UNTAGGED = "_untagged_" CONTENT_TYPE_ARTICLE = "article" CONTENT_TYPE_VIDEO = "video" CONTENT_TYPE_IMAGE = "image" SORT_NEWEST = "newest" SORT_OLDEST = "oldest" SORT_TITLE = "title" SORT_SITE = "site" DETAIL_TYPE_SIMPLE = "simple" DETAIL_TYPE_COMPLETE = "complete" )
Variables ¶
View Source
var (
URLs = map[string]string{
"Add": "https://getpocket.com/v3/add",
"Retrieve": "https://getpocket.com/v3/get",
"Modify": "https://getpocket.com/v3/send",
}
)
Functions ¶
This section is empty.
Types ¶
type Add ¶
type Add struct { URL string // contains filtered or unexported fields }
@see http://getpocket.com/developer/docs/v3/add
func (*Add) Exec ¶
func (a *Add) Exec(user auth.Authenticated) (*AddResponse, error)
func (*Add) SetConsumerKey ¶
func (c *Add) SetConsumerKey(consumerKey string)
func (*Add) SetRequest ¶
func (c *Add) SetRequest(request utils.HttpRequest)
func (*Add) SetTitle ¶
This can be included for cases where an item does not have a title, which is typical for image or PDF URLs. If Pocket detects a title from the content of the page, this parameter will be ignored.
func (*Add) SetTweetID ¶
type AddResponse ¶
type Item ¶
type Item struct { Id string `json:"item_id"` NormalURL string `json:"normal_url"` ResolvedId string `json:"resolved_id"` ResolvedURL string `json:"resolved_url"` DomainId string `json:"domain_id"` OriginDomainId string `json:"origin_domain_id"` ResponseCode string `json:"response_code"` MimeType string `json:"mime_type"` ContentLength string `json:"content_length"` Encoding string `json:"encoding"` DateResolved string `json:"date_resolved"` DatePublished string `json:"date_published"` Title string `json:"title"` Excerpt string `json:"excerpt"` WordCount string `json:"word_count"` HasImage string `json:"has_image"` HasVideo string `json:"has_video"` IsIndex string `json:"is_index"` Authors map[string]ItemAuthor `json:"authors"` Images map[string]ItemImage `json:"images"` Videos map[string]ItemVideo `json:"videos"` }
type ItemAuthor ¶
type Modify ¶
type Modify struct {
// contains filtered or unexported fields
}
@see http://getpocket.com/developer/docs/v3/add
func (*Modify) Exec ¶
func (c *Modify) Exec(user auth.Authenticated) (*ModifyResponse, error)
func (*Modify) SetConsumerKey ¶
func (c *Modify) SetConsumerKey(consumerKey string)
func (*Modify) SetRequest ¶
func (c *Modify) SetRequest(request utils.HttpRequest)
type ModifyResponse ¶
type Retrieve ¶
type Retrieve struct {
// contains filtered or unexported fields
}
@see http://getpocket.com/developer/docs/v3/retrieve
func NewRetrieve ¶
func NewRetrieve(consumerKey string, request utils.HttpRequest) *Retrieve
func (*Retrieve) Exec ¶
func (c *Retrieve) Exec(user auth.Authenticated) (*RetrieveResponse, error)
func (*Retrieve) SetConsumerKey ¶
func (c *Retrieve) SetConsumerKey(consumerKey string)
func (*Retrieve) SetContentType ¶
func (*Retrieve) SetDetailType ¶
func (*Retrieve) SetFavorite ¶
func (*Retrieve) SetRequest ¶
func (c *Retrieve) SetRequest(request utils.HttpRequest)
func (*Retrieve) SetUntagged ¶
type RetrieveItem ¶
type RetrieveItem struct { Id string `json:"item_id"` ResolvedId string `json:"resolved_id"` GivenURL string `json:"given_url"` ResolvedURL string `json:"resolved_url"` GivenTitle string `json:"given_title"` ResolvedTitle string `json:"resolved_title"` Favorite string `json:"favorite"` Status string `json:"status"` Excerpt string `json:"excerpt"` IsArticle string `json:"is_article"` HasImage string `json:"has_image"` HasVideo string `json:"has_video"` WordCount string `json:"word_count"` 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"` IsIndex string `json:"is_index"` Tags map[string]ItemTag `json:"tags"` Authors map[string]ItemAuthor `json:"authors"` Images map[string]ItemImage `json:"images"` Videos map[string]ItemVideo `json:"videos"` }
type RetrieveResponse ¶
type RetrieveResponse struct { List map[string]RetrieveItem `json:"list"` Status int `json:"status"` Complete int `json:"complete"` }
Click to show internal directories.
Click to hide internal directories.