Documentation ¶
Index ¶
- Variables
- type BskyAgent
- type Embed
- type Facet
- type Facet_Type
- type Image
- type Link
- type PostBuilder
- func (pb PostBuilder) AtTime(t time.Time) PostBuilder
- func (pb PostBuilder) Build() (appbsky.FeedPost, error)
- func (pb PostBuilder) InReplyTo(post appbsky.FeedPost, actorID, cid, rkey string) PostBuilder
- func (pb PostBuilder) WithExternalLink(title string, link url.URL, description string) PostBuilder
- func (pb PostBuilder) WithFacet(ftype Facet_Type, value string, text string) PostBuilder
- func (pb PostBuilder) WithImages(blobs []lexutil.LexBlob, images []Image) PostBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var FeedPost_Embed appbsky.FeedPost_Embed
Functions ¶
This section is empty.
Types ¶
type BskyAgent ¶
type BskyAgent struct {
// contains filtered or unexported fields
}
Wrapper over the atproto xrpc transport
func (*BskyAgent) Connect ¶
Connect and Authenticate to the provided Personal Data Server, default is Bluesky PDS No need to refresh the access token if the bot script will be executed based on the cron job
func (*BskyAgent) PostToFeed ¶
Post to social app
type Facet ¶
type Facet struct { Ftype Facet_Type Value string T_facet string }
type Facet_Type ¶
type Facet_Type int
const ( Facet_Link Facet_Type = iota + 1 Facet_Mention Facet_Tag )
func (Facet_Type) String ¶
func (f Facet_Type) String() string
type PostBuilder ¶
type PostBuilder struct { Text string Facet []Facet Embed Embed Time time.Time Reply *appbsky.FeedPost_ReplyRef }
construct the post
func (PostBuilder) AtTime ¶
func (pb PostBuilder) AtTime(t time.Time) PostBuilder
func (PostBuilder) Build ¶
func (pb PostBuilder) Build() (appbsky.FeedPost, error)
Build the request
func (PostBuilder) InReplyTo ¶
func (pb PostBuilder) InReplyTo(post appbsky.FeedPost, actorID, cid, rkey string) PostBuilder
Create a post in reply to another post
func (PostBuilder) WithExternalLink ¶
func (pb PostBuilder) WithExternalLink(title string, link url.URL, description string) PostBuilder
Create a Post with external links
func (PostBuilder) WithFacet ¶
func (pb PostBuilder) WithFacet(ftype Facet_Type, value string, text string) PostBuilder
Create a Richtext Post with facests
func (PostBuilder) WithImages ¶
func (pb PostBuilder) WithImages(blobs []lexutil.LexBlob, images []Image) PostBuilder
Create a Post with images
Click to show internal directories.
Click to hide internal directories.