bluesky

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBGSHost = "https://bsky.network"
View Source
const DefaultPDSHost = "https://bsky.social"

DefaultPDSHost is now the vPDS - be cautious - making calls for user data who aren't on the same PDS as the authenticated account may fail. Use BGS or AppView.

View Source
const UserAgent = "github.com/strideynet/bluesky-furry-feed"

Variables

This section is empty.

Functions

func FormatTime

func FormatTime(t time.Time) string

func ParseTime

func ParseTime(str string) (time.Time, error)

Types

type BGSClient added in v0.0.48

type BGSClient struct {
	BGSHost string
}

func (*BGSClient) SyncGetRecord added in v0.0.48

func (c *BGSClient) SyncGetRecord(
	ctx context.Context, collection string, actorDID string, rkey string,
) (record typegen.CBORMarshaler, repoRev string, err error)

SyncGetRecord invokes the `SyncGetRecord` RPC against the BGS, and then parses the returned CAR to retrieve the record and the current repo rev.

type Credentials added in v0.0.2

type Credentials struct {
	Identifier string
	Password   string
}

func CredentialsFromEnv added in v0.0.2

func CredentialsFromEnv() (*Credentials, error)

type PDSClient added in v0.0.48

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

func ClientFromCredentials added in v0.0.2

func ClientFromCredentials(ctx context.Context, pdsHost string, credentials *Credentials) (*PDSClient, error)

func (*PDSClient) DeleteRecord added in v0.0.48

func (c *PDSClient) DeleteRecord(
	ctx context.Context, uri *indigoUtils.ParsedUri,
) error

DeleteRecord deletes a record from a repository

func (*PDSClient) Follow added in v0.0.48

func (c *PDSClient) Follow(
	ctx context.Context, subjectDID string,
) error

Follow creates an app.bsky.graph.follow for the user the client is authenticated as.

func (*PDSClient) GetProfile added in v0.0.48

func (c *PDSClient) 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 (*PDSClient) PurgeFeeds added in v0.0.48

func (c *PDSClient) PurgeFeeds(
	ctx context.Context,
) error

PurgeFeeds deletes all feeds associated with the authenticated user

func (*PDSClient) PutRecord added in v0.0.48

func (c *PDSClient) PutRecord(
	ctx context.Context, collection, rkey string, record repo.CborMarshaler,
) error

PutRecord creates or updates a record in the actor's repository.

func (*PDSClient) ResolveHandle added in v0.0.48

func (c *PDSClient) ResolveHandle(ctx context.Context, handle string) (*atproto.IdentityResolveHandle_Output, error)

func (*PDSClient) Unfollow added in v0.0.48

func (c *PDSClient) Unfollow(
	ctx context.Context, subjectDID string,
) error

Unfollow removes any app.bsky.graph.follow for the subject from the account the client is authenticated as.

func (*PDSClient) UploadBlob added in v0.0.48

func (c *PDSClient) UploadBlob(
	ctx context.Context, blob io.Reader,
) (*util.LexBlob, 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"`
}

RepoPutRecord_Input 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

Jump to

Keyboard shortcuts

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