pinboard

package
v0.0.0-...-a586f19 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func XML

func XML(result interface{}, mopt ...httpsimp.ParseOption) httpsimp.Parser

JSON is a Parser function that verifies the response status code and content type (which must be ContentTypeJSON) and unmarshals the body into the result variable (which can be anything that you'd pass to json.Unmarshal).

Pass the result of this function into Do or Parse to handle a response.

Types

type Credentials

type Credentials struct {
	Username string
	Password string
}

type Options

type Options struct {
	Credentials
	MockData []byte
}

type Post

type Post struct {
	URL         string
	Title       string
	Time        time.Time
	Tags        TagList
	Description string
}

func LoadRecent

func LoadRecent(req RecentRequest, opt Options) ([]*Post, error)

func (*Post) String

func (p *Post) String() string

func (*Post) TitleOrURL

func (p *Post) TitleOrURL() string

type RecentRequest

type RecentRequest struct {
	Tag   string
	Limit int
}

type TagList

type TagList []string

func (TagList) Contains

func (tl TagList) Contains(tag string) bool

func (TagList) Index

func (tl TagList) Index(tag string) int

func (TagList) String

func (tl TagList) String() string

Jump to

Keyboard shortcuts

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