bluesky

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bluesky

type Bluesky struct {
	Host     string `json:"host"`
	Handle   string `json:"handle"`
	Password string `json:"password"`
	// contains filtered or unexported fields
}

Bluesky is configuration for Bluesky

func New

func New(path, dir string, logger *zerolog.Logger) (*Bluesky, error)

New creates new Bluesky instance.

func (*Bluesky) BaseDir

func (cfg *Bluesky) BaseDir() string

BaseDir method returns base directory.

func (*Bluesky) CreateSession

func (cfg *Bluesky) CreateSession(ctx context.Context) error

CreateSession method makes XRPC instance and creates/refreshes session.

func (*Bluesky) Logger

func (cfg *Bluesky) Logger() *zerolog.Logger

Logger method returns zerolog.Logger instance.

func (*Bluesky) PostMessage

func (cfg *Bluesky) PostMessage(ctx context.Context, msg *Message) (string, error)

PostMessage method posts message and image files to Bluesky.

func (*Bluesky) Profile added in v0.2.0

func (cfg *Bluesky) Profile(ctx context.Context, actor string) (*bsky.ActorDefs_ProfileViewDetailed, error)

Profile method returns actor's profile information.

func (*Bluesky) ShowProfile

func (cfg *Bluesky) ShowProfile(ctx context.Context, actor string, jsonFlag bool, w io.Writer) error

ShowProfile method outouts actor's profile information to io.Wtiter.

type Message added in v0.2.0

type Message struct {
	Msg        string
	ImageFiles []string
}

Message is information of post message.

Jump to

Keyboard shortcuts

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