posts

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostsAddCmd

type PostsAddCmd struct {
	Url       string     `name:"url" required:"" help:"URL to bookmark" type:"string"`
	Title     string     `name:"title" required:"" help:"Title of bookmark" type:"string"`
	Descr     *string    `name:"descr" help:"Description of bookmark" type:"string"`
	Replace   bool       `name:"replace" negatable:"" help:"Replace existing bookmark" default:"true" type:"bool"`
	Shared    bool       `name:"shared" negatable:"" help:"Share bookmark with everyone" default:"true" type:"bool"`
	Tags      []string   `name:"tag" help:"Tags to add to bookmark" type:"string"`
	Timestamp *time.Time `name:"timestamp" help:"Timestamp to add bookmark(format: 2006-01-02T15:04:05Z)" type:"date"`
	Json      bool       `name:"json" help:"Output as JSON" default:"false" type:"bool"`
	Unread    *bool      `name:"unread" help:"Mark bookmark as unread" default:"false" type:"bool"`
}

PostsAddCmd is the command to add a bookmark.

func (*PostsAddCmd) Run

func (cmd *PostsAddCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsAllCmd

type PostsAllCmd struct {
	From    *time.Time `name:"from" help:"Get posts from this date/time (format: 2006-01-02T15:04:05Z)" type:"date"`
	Meta    bool       `name:"meta" help:"Get meta data for posts" default:"false" type:"bool"`
	Results *int       `name:"results" help:"Get this many results" type:"int"`
	Start   *int       `name:"start" help:"Start at this result" type:"int"`
	Tags    []string   `name:"tags" help:"Get posts with these tags" type:"strings"`
	To      *time.Time `name:"to" help:"Get posts to this date/time (format: 2006-01-02T15:04:05Z)" type:"date"`
	Json    bool       `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsAllCmd is the command to get all posts

func (*PostsAllCmd) Run

func (cmd *PostsAllCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsCmd

type PostsCmd struct {
	Add     PostsAddCmd     `cmd:"" help:"Add a bookmark."`
	All     PostsAllCmd     `cmd:"" help:"Get all bookmarks."`
	Dates   PostsDatesCmd   `cmd:"" help:"Get dates with bookmarks."`
	Del     PostsDeleteCmd  `cmd:"" help:"Delete a bookmark."`
	Get     PostsGetCmd     `cmd:"" help:"Get specific bookmarks."`
	Recent  PostsRecentCmd  `cmd:"" help:"Get recent bookmarks."`
	Suggest PostsSuggestCmd `cmd:"" help:"Get suggested tags for a URL."`
	Update  PostsUpdateCmd  `cmd:"" help:"Returns the most recent time a bookmark was added, updated or deleted."`
}

type PostsDatesCmd

type PostsDatesCmd struct {
	Tags []string `name:"tag" help:"Get posts with these tags (max: 3)" type:"strings"`
	Json bool     `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsDatesCmd is the command to return one or more posts on a single day matching the arguments

func (*PostsDatesCmd) Run

func (cmd *PostsDatesCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsDeleteCmd

type PostsDeleteCmd struct {
	Url  string `name:"url" required:"" help:"URL of bookmark to delete" type:"string"`
	Json bool   `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsDeleteCmd is the command to delete a bookmark.

func (*PostsDeleteCmd) Run

func (cmd *PostsDeleteCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsGetCmd

type PostsGetCmd struct {
	Date *string  `name:"date" help:"Get posts from this date (format: 2006-01-02)" type:"string"`
	Meta bool     `name:"meta" negatable:"" help:"Get meta data for posts" default:"true" type:"bool"`
	Tags []string `name:"tag" help:"Get posts with these tags (max: 3)" type:"strings"`
	Url  *string  `name:"url" help:"Get posts with this URL" type:"string"`
	Json bool     `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsGetCmd is the command to return one or more posts on a single day matching the arguments

func (*PostsGetCmd) Run

func (cmd *PostsGetCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsRecentCmd

type PostsRecentCmd struct {
	Count int      `name:"count" help:"Number of posts to return (max: 100)" default:"15" type:"int"`
	Tags  []string `name:"tag" help:"Get posts with these tags (max: 3)" type:"strings"`
	Json  bool     `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsRecentCmd is the command to return one or more posts on a single day matching the arguments

func (*PostsRecentCmd) Run

func (cmd *PostsRecentCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsSuggestCmd

type PostsSuggestCmd struct {
	Url  string `name:"url" required:"" help:"URL from which to suggest" type:"string"`
	Json bool   `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsSuggestCmd is the command to return one or more posts on a single day matching the arguments

func (*PostsSuggestCmd) Run

func (cmd *PostsSuggestCmd) Run(ctx *clictx.Context) error

Run runs the command

type PostsUpdateCmd

type PostsUpdateCmd struct {
	Json bool `name:"json" help:"Output as JSON" default:"false" type:"bool"`
}

PostsUpdateCmd is the command Returns the most recent time a bookmark was added, updated or deleted.

func (*PostsUpdateCmd) Run

func (cmd *PostsUpdateCmd) Run(ctx *clictx.Context) error

Run runs the command

Jump to

Keyboard shortcuts

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