-
Notifications
You must be signed in to change notification settings - Fork 3
Highlights
Csaba Okrona edited this page Oct 6, 2020
·
1 revision
Read more at the official Instapaper API docs page
svc := instapaper.HighlightService{
Client: apiClient,
}
highlightList, err := svc.List(123456)
This returns a slice of Highlight
:
type Highlight struct {
ID int `json:"highlight_id"`
BookmarkID int `json:"bookmark_id"`
Text string
Note string
Time json.Number
Position int
}
Add requires a bookmark ID, a text and a position to create a new highlight. The triplet needs to be unique, otherwise, an error is returned. It returns the created Highlight
.
folder, err := svc.Add("Totally unique folder name I swear")
Delete removes a highlight from the specified bookmark. It requires a Highlight ID as a parameter.
err := svc.Delete(123456)