bot

package
v0.0.0-...-dd30785 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FB

type FB struct {
	PageID      string
	AccessToken string
	PostJSON    func(path, method string, values interface{}, authHeader string) ([]byte, error)
}

func InitFB

func InitFB() *FB

func (*FB) PostToFB

func (f *FB) PostToFB(post *base.Post) error

type IG

type IG struct {
	UserID      string
	AccessToken string
	Post        func(string, url.Values, string) ([]byte, error)
}

func InitIG

func InitIG() *IG

func (*IG) PostToIG

func (i *IG) PostToIG(post *base.Post) error

type Mastodon

type Mastodon struct {
	Client MastodonClient
}

func InitMastodon

func InitMastodon() *Mastodon

func (*Mastodon) PostToMastodon

func (m *Mastodon) PostToMastodon(post *base.Post) error

type MastodonClient

type MastodonClient interface {
	PostStatus(ctx context.Context, toot *mastodon.Toot) (*mastodon.Status, error)
}

type MediaResponse

type MediaResponse struct {
	ID string `json:"id"`
}

type Site

type Site struct{}

func InitSite

func InitSite() *Site

func (*Site) PostToSite

func (s *Site) PostToSite(post *base.Post) error

type X

type X struct {
	AccessToken string
	PostJSON    func(path, method string, values interface{}, authHeader string) ([]byte, error)
}

func InitX

func InitX() *X

func (*X) PostToX

func (x *X) PostToX(post *base.Post) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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