client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
	Data    json.RawMessage `json:"data"`
}

type Card

type Card struct {
	ID           string      `json:"id"`
	Title        string      `json:"title"`
	Description  string      `json:"description"`
	ArticleTitle string      `json:"article_title"`
	Domain       string      `json:"domain"`
	Type         string      `json:"type"`
	Tags         []string    `json:"tags"`
	URL          string      `json:"url"`
	CuboxURL     string      `json:"cubox_url"`
	WordsCount   int         `json:"words_count"`
	CreateTime   string      `json:"create_time"`
	UpdateTime   string      `json:"update_time"`
	Highlights   []Highlight `json:"highlights"`
}

type CardFilterRequest

type CardFilterRequest struct {
	GroupFilters   []string `json:"group_filters,omitempty"`
	TypeFilters    []string `json:"type_filters,omitempty"`
	TagFilters     []string `json:"tag_filters,omitempty"`
	Starred        *bool    `json:"starred,omitempty"`
	Read           *bool    `json:"read,omitempty"`
	Annotated      *bool    `json:"annotated,omitempty"`
	LastCardID     string   `json:"last_card_id,omitempty"`
	LastCardUpdate string   `json:"last_card_update_time,omitempty"`
	Limit          int      `json:"limit,omitempty"`
}

type Client

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

func New

func New(baseURL, token string) *Client

func (*Client) FilterCards

func (c *Client) FilterCards(req *CardFilterRequest) ([]Card, error)

func (*Client) GetCardContent

func (c *Client) GetCardContent(id string) (string, error)

func (*Client) ListGroups

func (c *Client) ListGroups() ([]Group, error)

func (*Client) ListTags

func (c *Client) ListTags() ([]Tag, error)

type Group

type Group struct {
	ID            string  `json:"id"`
	NestedName    string  `json:"nested_name"`
	Name          string  `json:"name"`
	ParentID      *string `json:"parent_id"`
	Uncategorized bool    `json:"uncategorized,omitempty"`
}

type Highlight

type Highlight struct {
	ID         string `json:"id"`
	Text       string `json:"text"`
	ImageURL   string `json:"image_url"`
	CuboxURL   string `json:"cubox_url"`
	Note       string `json:"note"`
	Color      string `json:"color"`
	CreateTime string `json:"create_time"`
}

type Tag

type Tag struct {
	ID         string  `json:"id"`
	NestedName string  `json:"nested_name"`
	Name       string  `json:"name"`
	ParentID   *string `json:"parent_id"`
}

Jump to

Keyboard shortcuts

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