patreonapi

package
v0.0.0-...-cf85039 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogQuiet = iota
	LogNormal
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Patreon

type Patreon struct {
	SessionID string
	LogLevel  int
}

func (*Patreon) GetPatreonPosts

func (p *Patreon) GetPatreonPosts(maxPage, per int, cursor string) ([]Post, error)

per must not be less than 1 or greater than 20, cursor can be "null" or previous post's published_at string like "2020-01-01T12:00:00"

type Post

type Post struct {
	ID           string    `json:"id"`
	Image        *string   `json:"image"`
	URL          string    `json:"url"`
	Title        string    `json:"title"`
	Content      *string   `json:"content"`
	CommentCount int       `json:"comment_count"`
	LikeCount    int       `json:"like_count"`
	MediaType    *string   `json:"media_type"`
	MediaURL     *string   `json:"media_url"`
	Tags         []string  `json:"tags"`
	PublishedAt  time.Time `json:"published_at"`
}

Jump to

Keyboard shortcuts

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