hoarder

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID          = "hoarder"
	EndpointKey = "endpoint"
	ApikeyKey   = "api_key"
)
View Source
const (
	MaxPageSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachedResponse

type AttachedResponse struct {
	Attached []string `json:"attached"`
}

type Bookmark

type Bookmark struct {
	Id            string      `json:"id"`
	CreatedAt     time.Time   `json:"createdAt"`
	Title         string      `json:"title"`
	Archived      bool        `json:"archived"`
	Favourited    bool        `json:"favourited"`
	TaggingStatus string      `json:"taggingStatus"`
	Note          interface{} `json:"note"`
	Summary       interface{} `json:"summary"`
	Tags          []Tag       `json:"tags"`
	Content       struct {
		Type        string      `json:"type"`
		Url         string      `json:"url"`
		Title       interface{} `json:"title"`
		Description interface{} `json:"description"`
		ImageUrl    interface{} `json:"imageUrl"`
		Favicon     interface{} `json:"favicon"`
		HtmlContent string      `json:"htmlContent"`
		CrawledAt   interface{} `json:"crawledAt"`
	} `json:"content"`
	Assets []interface{} `json:"assets"`
}

type BookmarksResponse

type BookmarksResponse struct {
	Bookmarks  []Bookmark `json:"bookmarks"`
	NextCursor string     `json:"nextCursor"`
}

type Hoarder

type Hoarder struct {
	// contains filtered or unexported fields
}

func NewHoarder

func NewHoarder(endpoint string, apiKey string) *Hoarder

func (*Hoarder) AttachTagsToBookmark

func (i *Hoarder) AttachTagsToBookmark(bookmarkId string, tags []string) (*AttachedResponse, error)

func (*Hoarder) GetAllBookmarks

func (i *Hoarder) GetAllBookmarks(limit int) (*BookmarksResponse, error)

func (*Hoarder) GetAllTags

func (i *Hoarder) GetAllTags() (*TagsResponse, error)

type Tag

type Tag struct {
	Id                         string `json:"id"`
	Name                       string `json:"name"`
	AttachedBy                 string `json:"attachedBy"`
	NumBookmarks               int    `json:"numBookmarks"`
	NumBookmarksByAttachedType struct {
		Ai    int `json:"ai"`
		Human int `json:"human"`
	} `json:"numBookmarksByAttachedType"`
}

type TagsResponse

type TagsResponse struct {
	Tags []Tag `json:"tags"`
}

Jump to

Keyboard shortcuts

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