client

package
v0.0.0-...-1075339 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldSkipPost

func ShouldSkipPost(post Post) bool

Types

type Account

type Account struct {
	Id string `json:"id"`
}

type Client

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

func New

func New(userURL string) (Client, error)

func (Client) GetPosts

func (c Client) GetPosts(filter PostsFilter) ([]Post, error)

type MediaAttachment

type MediaAttachment struct {
	Type        string `json:"type"`
	Url         string `json:"url"`
	Description string `json:"description"`
}

type Post

type Post struct {
	CreatedAt        time.Time         `json:"created_at"`
	Id               string            `json:"id"`
	Visibility       string            `json:"visibility"`
	InReplyToId      string            `json:"in_reply_to_id"`
	URI              string            `json:"uri"`
	Content          string            `json:"content"`
	MediaAttachments []MediaAttachment `json:"media_attachments"`
}

type PostsFilter

type PostsFilter struct {
	ExcludeReplies bool
	ExcludeReblogs bool
	Limit          int
	SinceId        string
	MinId          string
	MaxId          string
}

Jump to

Keyboard shortcuts

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