Documentation
¶
Index ¶
- Constants
- func FormatTime(t time.Time) string
- func ParseTime(str string) (time.Time, error)
- type Client
- func (c *Client) DeleteRecord(ctx context.Context, uri *indigoUtils.ParsedUri) error
- func (c *Client) Follow(ctx context.Context, subjectDID string) error
- func (c *Client) GetFollowers(ctx context.Context, actor string, cursor string, limit int64) (*bsky.GraphGetFollowers_Output, error)
- func (c *Client) GetHead(ctx context.Context, actorDID string) (cid.Cid, error)
- func (c *Client) GetProfile(ctx context.Context, actor string) (*bsky.ActorDefs_ProfileViewDetailed, error)
- func (c *Client) GetRecord(ctx context.Context, collection string, commitCID cid.Cid, actorDID string, ...) (typegen.CBORMarshaler, error)
- func (c *Client) PurgeFeeds(ctx context.Context) error
- func (c *Client) PutRecord(ctx context.Context, collection, rkey string, record repo.CborMarshaler) error
- func (c *Client) ResolveHandle(ctx context.Context, handle string) (*atproto.IdentityResolveHandle_Output, error)
- func (c *Client) Unfollow(ctx context.Context, subjectDID string) error
- func (c *Client) UploadBlob(ctx context.Context, blob io.Reader) (*util.LexBlob, error)
- type Credentials
- type RepoPutRecord_Input
Constants ¶
const DefaultPDSHost = "https://bsky.social"
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func ClientFromCredentials ¶ added in v0.0.2
func ClientFromToken ¶ added in v0.0.2
ClientFromToken takes a JWT access token, and makes a client. It then calls GetSession to verify the token.
On success, an authenticated client is returned along with the JWTs DID
func (*Client) DeleteRecord ¶ added in v0.0.22
DeleteRecord deletes a record from a repository
func (*Client) Follow ¶
Follow creates an app.bsky.graph.follow for the user the client is authenticated as.
func (*Client) GetFollowers ¶
func (*Client) GetProfile ¶
func (c *Client) GetProfile( ctx context.Context, actor string, ) (*bsky.ActorDefs_ProfileViewDetailed, error)
GetProfile fetches an actor's profile. actor can be a DID or a handle.
func (*Client) PurgeFeeds ¶ added in v0.0.22
PurgeFeeds deletes all feeds associated with the authenticated user
func (*Client) PutRecord ¶ added in v0.0.22
func (c *Client) PutRecord( ctx context.Context, collection, rkey string, record repo.CborMarshaler, ) error
PutRecord creates or updates a record in the actor's repository.
func (*Client) ResolveHandle ¶ added in v0.0.2
type Credentials ¶ added in v0.0.2
func CredentialsFromEnv ¶ added in v0.0.2
func CredentialsFromEnv() (*Credentials, error)
type RepoPutRecord_Input ¶ added in v0.0.22
type RepoPutRecord_Input struct { // collection: The NSID of the record collection. Collection string `json:"collection" cborgen:"collection"` // record: The record to write. Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` // repo: The handle or DID of the repo. Repo string `json:"repo" cborgen:"repo"` // rkey: The key of the record. Rkey string `json:"rkey" cborgen:"rkey"` // swapCommit: Compare and swap with the previous commit by cid. SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` // swapRecord: Compare and swap with the previous record by cid. SwapRecord *string `json:"swapRecord,omitempty" cborgen:"swapRecord,omitempty"` // validate: Validate the record? Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` }
This exists because the go code gen is incorrect for swapRecord and misses an omitEmpty on SwapRecord. putting feed record: putting record: XRPC ERROR 400: InvalidSwap: Record was at bafyreigkeuzjkpot7yzpseezz4hat2jmlobypfhtaaisxbdlwafwxp4ywa