hoarder

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 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 ArchiveResponse added in v0.26.1

type ArchiveResponse struct {
	Archived bool `json:"archived"`
}

type AttachTagsResponse added in v0.26.1

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

type Bookmark

type Bookmark struct {
	Id            string                      `json:"id"`
	CreatedAt     string                      `json:"createdAt"`
	ModifiedAt    *string                     `json:"modifiedAt"`
	Title         *string                     `json:"title,omitempty"`
	Archived      bool                        `json:"archived"`
	Favourited    bool                        `json:"favourited"`
	TaggingStatus *string                     `json:"taggingStatus"`
	Note          *string                     `json:"note,omitempty"`
	Summary       *string                     `json:"summary,omitempty"`
	Tags          []BookmarkTagsInner         `json:"tags"`
	Assets        []BookmarksBookmarkIdAssets `json:"assets"`
	Content       BookmarkContent             `json:"content"`
}

func (Bookmark) GetSummary added in v0.26.1

func (b Bookmark) GetSummary() string

func (Bookmark) GetTitle added in v0.26.1

func (b Bookmark) GetTitle() string

type BookmarkContent added in v0.26.1

type BookmarkContent struct {
	Type                     string  `json:"type"`
	Url                      string  `json:"url"`
	Title                    *string `json:"title,omitempty"`
	Description              *string `json:"description,omitempty"`
	ImageUrl                 *string `json:"imageUrl,omitempty"`
	ImageAssetId             *string `json:"imageAssetId,omitempty"`
	ScreenshotAssetId        *string `json:"screenshotAssetId,omitempty"`
	FullPageArchiveAssetId   *string `json:"fullPageArchiveAssetId,omitempty"`
	PrecrawledArchiveAssetId *string `json:"precrawledArchiveAssetId,omitempty"`
	VideoAssetId             *string `json:"videoAssetId,omitempty"`
	Favicon                  *string `json:"favicon,omitempty"`
	HtmlContent              *string `json:"htmlContent,omitempty"`
	CrawledAt                *string `json:"crawledAt,omitempty"`
}

type BookmarkTagRequest added in v0.26.1

type BookmarkTagRequest struct {
	TagName string `json:"tag_name"`
}

type BookmarkTagsInner added in v0.26.1

type BookmarkTagsInner struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	AttachedBy string `json:"attachedBy"`
}

type BookmarksBookmarkIdAssets added in v0.26.1

type BookmarksBookmarkIdAssets struct {
	Id        string `json:"id"`
	AssetType string `json:"assetType"`
}

type BookmarksResponse

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

type Hoarder

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

func GetClient added in v0.28.11

func GetClient() *Hoarder

func NewHoarder

func NewHoarder(endpoint string, apiKey string) *Hoarder

func (*Hoarder) ArchiveBookmark added in v0.23.1

func (i *Hoarder) ArchiveBookmark(id string) (bool, error)

func (*Hoarder) AttachTagsToBookmark

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

func (*Hoarder) CreateBookmark added in v0.24.1

func (i *Hoarder) CreateBookmark(url string) (*Bookmark, error)

func (*Hoarder) GetAllBookmarks

func (i *Hoarder) GetAllBookmarks(limit int) ([]Bookmark, error)

func (*Hoarder) GetAllTags

func (i *Hoarder) GetAllTags() ([]Tag, error)

type Tag

type Tag struct {
	Id                         string                        `json:"id"`
	Name                       string                        `json:"name"`
	NumBookmarks               float32                       `json:"numBookmarks"`
	NumBookmarksByAttachedType TagNumBookmarksByAttachedType `json:"numBookmarksByAttachedType"`
}

type TagNumBookmarksByAttachedType added in v0.26.1

type TagNumBookmarksByAttachedType struct {
	Ai    *float32 `json:"ai,omitempty"`
	Human *float32 `json:"human,omitempty"`
}

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