Documentation
¶
Index ¶
- Constants
- type Category
- type Client
- func (c *Client) Delete(ctx context.Context, ID string) error
- func (c *Client) List(ctx context.Context, params ListParams) (*ListResponse, error)
- func (c *Client) ListPaginate(ctx context.Context, params ListParams) iter.Seq2[Page, error]
- func (c *Client) Save(ctx context.Context, params SaveParams) (*SaveResponse, error)
- type Document
- type ErrorRateLimited
- type ListParams
- type ListResponse
- type Location
- type Page
- type SaveParams
- type SaveResponse
Constants ¶
View Source
const ( LocationNew = "new" LocationLater = "later" LocationShortList = "shortlist" LocationArchive = "archive" LocationFeed = "feed" )
View Source
const ( CategoryArticle = "article" CategoryEmail = "email" CategoryRSS = "rss" CategoryHighlight = "highlight" CategoryNote = "note" CategoryPDF = "pdf" CategoryEPUB = "epub" CategoryTweet = "tweet" CategoryVideo = "video" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) List ¶
func (c *Client) List(ctx context.Context, params ListParams) (*ListResponse, error)
func (*Client) ListPaginate ¶
func (*Client) Save ¶
func (c *Client) Save(ctx context.Context, params SaveParams) (*SaveResponse, error)
type Document ¶
type Document struct {
ID string
URL string
SourceURL string
Title string
Author string
Source string
Category Category
Location Location
Tags map[string]any
SiteName string
WordCount int
CreatedAt time.Time
UpdatedAt time.Time
Notes string
PublishedDate time.Time
Summary string
ImageURL string
ParentID string
ReadingProgress float64
FirstOpenedAt time.Time
LastOpenedAt time.Time
SavedAt time.Time
LastMovedAt time.Time
}
type ErrorRateLimited ¶
func (*ErrorRateLimited) Error ¶
func (e *ErrorRateLimited) Error() string
type ListParams ¶
type ListParams struct {
ID string `url:"id,omitempty"`
UpdatedAfter time.Time `url:"updatedAfter,omitempty"`
Location Location `url:"location,omitempty"`
Category Category `url:"category,omitempty"`
PageCursor string `url:"pageCursor,omitempty"`
WithHTMLContent bool `url:"withHTMLContent,omitempty"`
}
type ListResponse ¶
type SaveParams ¶
type SaveParams struct {
URL string `json:"url"`
HTML *string `json:"html,omitempty"`
ShouldCleanHTML *bool `json:"should_clean_html,omitempty"`
Title *string `json:"title,omitempty"`
Author *string `json:"author,omitempty"`
Summary *string `json:"summary,omitempty"`
PublishedDate *time.Time `json:"published_date,omitempty"`
ImageURL *string `json:"image_url,omitempty"`
Location Location `json:"location,omitempty"`
Category Category `json:"category,omitempty"`
SavedUsing *string `json:"saved_using,omitempty"`
Tags []string `json:"tags,omitempty"`
Notes *string `json:"notes,omitempty"`
}
type SaveResponse ¶
Click to show internal directories.
Click to hide internal directories.