mastodon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(apiRoot, token string, p *Post) error

Types

type Post

type Post struct {
	CreatedAt time.Time `json:"created_at"`
	ID        string    `json:"id"`
	InReplyTo string    `json:"in_reply_to_id"`
	Content   string    `json:"content"`
	URL       string    `json:"url"`
}

func DecodeMail

func DecodeMail(r io.Reader) (*Post, error)

DecodeMail decodes the RFC822 message-encoded post from r.

func Search(apiRoot, token, query string) ([]Post, error)

type Stream

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

func Watch

func Watch(streamURL, token string) (*Stream, error)

func (*Stream) Err

func (st *Stream) Err() error

func (*Stream) Next

func (st *Stream) Next() bool

func (*Stream) Post

func (st *Stream) Post() Post

Jump to

Keyboard shortcuts

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