models

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddedArticleResult

type AddedArticleResult struct {
	*ArticleResult
	NormalURL      string `json:"normal_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"`
	IsIndex        string `json:"isindex"`
}

AddedArticleResult represents all results for add article

type ArticleResult

type ArticleResult struct {
	ItemID        string `json:"item_id"`
	ResolvedID    string `json:"resolved_id"`
	ResolvedURL   string `json:"resolved_url"`
	ResolvedTitle string `json:"resolved_title"`

	GivenURL   string `json:"given_url"`
	GivenTitle string `json:"given_title"`
	Favorite   int    `json:"favorite,string"`
	Status     int    `json:"status,string"`

	Excerpt   string `json:"excerpt"`
	IsArticle string `json:"is_article"`
	HasVideo  int    `json:"has_video,string"`
	HasImage  int    `json:"has_image,string"`
	WordCount int    `json:"word_count,string"`
}

ArticleResult represents all common results

type PocketAction

type PocketAction struct {
	Action string `json:"action"`
	ItemID string `json:"item_id"`
	Time   string `json:"time,omitempty"`
	Tags   string `json:"tags,omitempty"`
}

PocketAction represents a single action item for the Pocket API Modify endpoint

type PocketAdd

type PocketAdd struct {
	Url     string `json:"url"`
	Title   string `json:"title,omitempty"`
	Tags    string `json:"tags,omitempty"`
	TweetID string `json:"tweet_id,omitempty"`
}

PocketAdd represents a request to Pocket API Add endpoint

type PocketAddResult

type PocketAddResult struct {
	Status int                 `json:"status"`
	Item   *AddedArticleResult `json:"item"`
}

PocketAddResult represents results from Pocket API's Add endpoint

type PocketModify

type PocketModify struct {
	Actions []PocketAction `json:"actions"`
}

PocketModify represents a request to Pocket API Modify endpoint

type PocketModifyResult

type PocketModifyResult struct {
	Status        int           `json:"status"`
	ActionResults []interface{} `json:"action_results"`
	ActionErrors  []interface{} `json:"action_errors"`
}

PocketModifyResult represents results from Pocket API's Modify endpoint TODO create two struct types for action results and errors

type PocketParam

type PocketParam interface{}

PocketParam is an interface representing a request parameter to Pocket API

type PocketResponse

type PocketResponse interface{}

PocketResponse is an interface representing a response from Pocket API

type PocketResult

type PocketResult interface{}

PocketResult is an interface representing a result item from Pocket API

type PocketRetrieve

type PocketRetrieve struct {
	Tag    string `json:"tag"`
	Sort   string `json:"sort"`
	State  string `json:"state"`
	Count  int    `json:"count"`
	Offset int    `json:"offset"`
}

PocketRetrieve represents a request to Pocket API Retrieve endpoint

type PocketRetrieveResult

type PocketRetrieveResult struct {
	Status int                      `json:"status"`
	List   map[string]ArticleResult `json:"list"`
}

PocketRetrieveResult represents results from Pocket API's Retrieve endpoint

type RetrievedArticleResult

type RetrievedArticleResult struct {
	*ArticleResult
	Tags []string `json:"tags,string"`
}

RetrievedArticleResult represents all results for retrieve article

Jump to

Keyboard shortcuts

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