tumblr

package
v0.0.0-...-6be15d9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "tumblr-importr"

Variables

This section is empty.

Functions

func CLI

func CLI(args []string) error

Types

type APIEnvelope

type APIEnvelope struct {
	Response APIResponse `json:"response"`
}

type APIResponse

type APIResponse struct {
	Total int    `json:"total_posts"`
	Posts []Post `json:"posts"`
}

type Client

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

func NewClient

func NewClient(blog, key string, cl *http.Client) *Client

func (*Client) GetOffset

func (tc *Client) GetOffset(ctx context.Context, offset int) (resp APIResponse, err error)

type FrontMatter

type FrontMatter struct {
	Date    time.Time   `toml:"date"`
	Title   string      `toml:"title,omitempty"`
	Slug    string      `toml:"slug,omitempty"`
	Id      int         `toml:"id,string"`
	Aliases []string    `toml:"aliases"`
	Tags    []string    `toml:"tags"`
	Type    string      `toml:"type"`
	Tumblr  interface{} `toml:"tumblr,multiline"`
}

type Post

type Post struct {
	json.RawMessage
}

Jump to

Keyboard shortcuts

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