XrpcBlueskyApi

class XrpcBlueskyApi(httpClient: HttpClient) : BlueskyApi

Constructors

Link copied to clipboard
constructor()
constructor(httpClient: HttpClient)

Functions

Link copied to clipboard
open suspend override fun activateAccount(): AtpResponse<Unit>

Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup.

Link copied to clipboard
open suspend override fun applyWrites(request: ApplyWritesRequest): AtpResponse<Unit>

Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.

Link copied to clipboard

Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.

Link copied to clipboard

Check accounts location in signup queue.

Link copied to clipboard
open suspend override fun confirmEmail(request: ConfirmEmailRequest): AtpResponse<Unit>

Confirm an email using a token from com.atproto.server.requestEmailConfirmation.

Link copied to clipboard

Create an account. Implemented by PDS.

Link copied to clipboard

Create an App Password.

Link copied to clipboard

Create an invite code.

Link copied to clipboard

Create invite codes.

Link copied to clipboard

Create a single new repository record. Requires auth, implemented by PDS.

Link copied to clipboard

Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.

Link copied to clipboard

Create an authentication session.

Link copied to clipboard

Administrative action to create a new, re-usable communication (email for now) template.

Link copied to clipboard
open suspend override fun deactivateAccount(request: DeactivateAccountRequest): AtpResponse<Unit>

Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.

Link copied to clipboard
open suspend override fun deleteAccount(request: DeleteAccountRequest): AtpResponse<Unit>

Delete a user account as an administrator.

open suspend override fun deleteAccount(request: DeleteAccountRequest): AtpResponse<Unit>

Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.

Link copied to clipboard
open suspend override fun deleteRecord(request: DeleteRecordRequest): AtpResponse<Unit>

Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.

Link copied to clipboard
open suspend override fun deleteSession(): AtpResponse<Unit>

Delete the current session. Requires auth.

Link copied to clipboard
open suspend override fun deleteTemplate(request: DeleteTemplateRequest): AtpResponse<Unit>

Delete a communication template.

Link copied to clipboard

Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).

Link copied to clipboard

Get information about an account and repository, including the list of collections. Does not require auth.

Link copied to clipboard
open suspend override fun describeServer(): AtpResponse<DescribeServerResponse>

Describes the server's account creation requirements and capabilities. Implemented by PDS.

Link copied to clipboard

Disable an account from receiving new invite codes, but does not invalidate existing codes.

Link copied to clipboard
open suspend override fun disableInviteCodes(request: DisableInviteCodesRequest): AtpResponse<Unit>

Disable some set of codes and/or all codes associated with a set of users.

Link copied to clipboard
open suspend override fun emitEvent(request: EmitEventRequest): AtpResponse<EmitEventResponse>

Take a moderation action on an actor.

Link copied to clipboard

Re-enable an account's ability to receive invite codes.

Link copied to clipboard
Link copied to clipboard

Get details about an account.

Link copied to clipboard

Get details about some accounts.

Link copied to clipboard

Get all invite codes for the current account. Requires auth.

Link copied to clipboard

Get a list of feeds (feed generator records) created by the actor (in the actor's repo).

Link copied to clipboard

Get a list of posts liked by an actor. Does not require auth.

Link copied to clipboard

Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.

Link copied to clipboard
open suspend override fun getBlob(params: GetBlobQueryParams): AtpResponse<ByteArray>

Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.

Link copied to clipboard
open suspend override fun getBlocks(params: GetBlocksQueryParams): AtpResponse<GetBlocksResponse>

Enumerates which accounts the requesting account is currently blocking. Requires auth.

open suspend override fun getBlocks(params: GetBlocksQueryParams): AtpResponse<ByteArray>

Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.

Link copied to clipboard
open suspend override fun getCheckout(params: GetCheckoutQueryParams): AtpResponse<ByteArray>
Link copied to clipboard
open suspend override fun getEvent(params: GetEventQueryParams): AtpResponse<GetEventResponse>

Get details about a moderation event.

Link copied to clipboard
open suspend override fun getFeed(params: GetFeedQueryParams): AtpResponse<GetFeedResponse>

Get a hydrated feed from an actor's selected feed generator. Implemented by App View.

Link copied to clipboard

Get information about a feed generator. Implemented by AppView.

Link copied to clipboard

Get information about a list of feed generators.

Link copied to clipboard

Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.

Link copied to clipboard

Enumerates accounts which follow a specified account (actor).

Link copied to clipboard
open suspend override fun getFollows(params: GetFollowsQueryParams): AtpResponse<GetFollowsResponse>

Enumerates accounts which a specified account (actor) follows.

Link copied to clipboard
open suspend override fun getHead(params: GetHeadQueryParams): AtpResponse<GetHeadResponse>
Link copied to clipboard

Get an admin view of invite codes.

Link copied to clipboard

Get the current commit CID & revision of the specified repo. Does not require auth.

Link copied to clipboard
open suspend override fun getLikes(params: GetLikesQueryParams): AtpResponse<GetLikesResponse>

Get like records which reference a subject (by AT-URI and CID).

Link copied to clipboard
open suspend override fun getList(params: GetListQueryParams): AtpResponse<GetListResponse>

Gets a 'view' (with additional context) of a specified list.

Link copied to clipboard

Get mod lists that the requesting account (actor) is blocking. Requires auth.

Link copied to clipboard

Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.

Link copied to clipboard

Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.

Link copied to clipboard
open suspend override fun getLists(params: GetListsQueryParams): AtpResponse<GetListsResponse>

Enumerates the lists created by a specified account (actor).

Link copied to clipboard
open suspend override fun getMutes(params: GetMutesQueryParams): AtpResponse<GetMutesResponse>

Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.

Link copied to clipboard

An unspecced view of globally popular feed generators.

Link copied to clipboard
open suspend override fun getPosts(params: GetPostsQueryParams): AtpResponse<GetPostsResponse>

Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.

Link copied to clipboard

Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.

Link copied to clipboard
open suspend override fun getPreferences(): AtpResponse<GetPreferencesResponse>

Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.

Link copied to clipboard
open suspend override fun getProfile(params: GetProfileQueryParams): AtpResponse<GetProfileResponse>

Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.

Link copied to clipboard

Get detailed profile views of multiple actors.

Link copied to clipboard

Describe the credentials that should be included in the DID doc of an account that is migrating to this service.

Link copied to clipboard
open suspend override fun getRecord(params: GetRecordQueryParams): AtpResponse<GetRecordResponse>

Get a single record from a repository. Does not require auth.

open suspend override fun getRecord(params: GetRecordQueryParams): AtpResponse<ByteArray>

Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.

open suspend override fun getRecord(params: GetRecordQueryParams): AtpResponse<GetRecordResponse>

Get details about a record.

Link copied to clipboard

Enumerates public relationships between one account, and a list of other accounts. Does not require auth.

Link copied to clipboard
open suspend override fun getRepo(params: GetRepoQueryParams): AtpResponse<ByteArray>

Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.

open suspend override fun getRepo(params: GetRepoQueryParams): AtpResponse<GetRepoResponse>

Get details about a repository.

Link copied to clipboard

Get a list of reposts for a given post.

Link copied to clipboard

Get a signed token on behalf of the requesting DID for the requested service.

Link copied to clipboard

Get information about a list of labeler services.

Link copied to clipboard
open suspend override fun getSession(): AtpResponse<GetSessionResponse>

Get information about the current auth session. Requires auth.

Link copied to clipboard

Get the service-specific admin status of a subject (account, record, or blob).

Link copied to clipboard

Get a list of suggested feeds (feed generators) for the requesting account.

Link copied to clipboard

Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.

Link copied to clipboard

Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.

Link copied to clipboard

Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions

Link copied to clipboard

Get a list of suggestions (feeds and users) tagged with categories

Link copied to clipboard

Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.

Link copied to clipboard

Count the number of unread notifications for the requesting account. Requires auth.

Link copied to clipboard
open suspend override fun importRepo(request: ByteArray): AtpResponse<Unit>

Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.

Link copied to clipboard

List all App Passwords.

Link copied to clipboard
open suspend override fun listBlobs(params: ListBlobsQueryParams): AtpResponse<ListBlobsResponse>

List blob CIDso for an account, since some repo revision. Does not require auth; implemented by PDS.

Link copied to clipboard

Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.

Link copied to clipboard

Enumerate notifications for the requesting account. Requires auth.

Link copied to clipboard

List a range of records in a repository, matching a specific collection. Does not require auth.

Link copied to clipboard
open suspend override fun listRepos(params: ListReposQueryParams): AtpResponse<ListReposResponse>

Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.

Link copied to clipboard
open suspend override fun listTemplates(): AtpResponse<ListTemplatesResponse>

Get list of all communication templates.

Link copied to clipboard
open suspend override fun muteActor(request: MuteActorRequest): AtpResponse<Unit>

Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.

Link copied to clipboard
open suspend override fun muteActorList(request: MuteActorListRequest): AtpResponse<Unit>

Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.

Link copied to clipboard
open suspend override fun notifyOfUpdate(request: NotifyOfUpdateRequest): AtpResponse<Unit>

Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.

Link copied to clipboard
open suspend override fun putPreferences(request: PutPreferencesRequest): AtpResponse<Unit>

Set the private preferences attached to the account.

Link copied to clipboard
open suspend override fun putRecord(request: PutRecordRequest): AtpResponse<PutRecordResponse>

Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.

Link copied to clipboard

List moderation events related to a subject.

Link copied to clipboard

Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.

Link copied to clipboard

View moderation statuses of subjects (record or repo).

Link copied to clipboard
open suspend override fun refreshSession(): AtpResponse<RefreshSessionResponse>

Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').

Link copied to clipboard
open suspend override fun registerPush(request: RegisterPushRequest): AtpResponse<Unit>

Register to receive push notifications, via a specified service, for the requesting account. Requires auth.

Link copied to clipboard
open suspend override fun requestAccountDelete(): AtpResponse<Unit>

Initiate a user account deletion via email.

Link copied to clipboard
open suspend override fun requestCrawl(request: RequestCrawlRequest): AtpResponse<Unit>

Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.

Link copied to clipboard
open suspend override fun requestEmailConfirmation(): AtpResponse<Unit>

Request an email with a code to confirm ownership of email.

Link copied to clipboard

Request a token in order to update email.

Link copied to clipboard

Initiate a user account password reset via email.

Link copied to clipboard

Request a verification code to be sent to the supplied phone number

Link copied to clipboard
open suspend override fun requestPlcOperationSignature(): AtpResponse<Unit>

Request an email with a code to in order to request a signed PLC operation. Requires Auth.

Link copied to clipboard

Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.

Link copied to clipboard
open suspend override fun resetPassword(request: ResetPasswordRequest): AtpResponse<Unit>

Reset a user account password using a token.

Link copied to clipboard

Resolves a handle (domain name) to a DID.

Link copied to clipboard
open suspend override fun revokeAppPassword(request: RevokeAppPasswordRequest): AtpResponse<Unit>

Revoke an App Password by name.

Link copied to clipboard

Find actors (profiles) matching search criteria. Does not require auth.

Link copied to clipboard

Backend Actors (profile) search, returns only skeleton.

Link copied to clipboard

Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.

Link copied to clipboard

Find posts matching search criteria, returning views of those posts.

Link copied to clipboard

Backend Posts search, returns only skeleton

Link copied to clipboard

Find repositories based on a search term.

Link copied to clipboard
open suspend override fun sendEmail(request: SendEmailRequest): AtpResponse<SendEmailResponse>

Send email to a user's account email address.

Link copied to clipboard

Send information about interactions with feed items back to the feed generator that served them.

Link copied to clipboard

Signs a PLC operation to update some value(s) in the requesting DID's document.

Link copied to clipboard
open suspend override fun submitPlcOperation(request: SubmitPlcOperationRequest): AtpResponse<Unit>

Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry

Link copied to clipboard

Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.

Link copied to clipboard

Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.

Link copied to clipboard
open suspend override fun unmuteActor(request: UnmuteActorRequest): AtpResponse<Unit>

Unmutes the specified account. Requires auth.

Link copied to clipboard
open suspend override fun unmuteActorList(request: UnmuteActorListRequest): AtpResponse<Unit>

Unmutes the specified list of accounts. Requires auth.

Link copied to clipboard
open suspend override fun updateAccountEmail(request: UpdateAccountEmailRequest): AtpResponse<Unit>

Administrative action to update an account's email.

Link copied to clipboard
open suspend override fun updateAccountHandle(request: UpdateAccountHandleRequest): AtpResponse<Unit>

Administrative action to update an account's handle.

Link copied to clipboard

Update the password for a user account as an administrator.

Link copied to clipboard
open suspend override fun updateEmail(request: UpdateEmailRequest): AtpResponse<Unit>

Update an account's email.

Link copied to clipboard
open suspend override fun updateHandle(request: UpdateHandleRequest): AtpResponse<Unit>

Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.

Link copied to clipboard
open suspend override fun updateSeen(request: UpdateSeenRequest): AtpResponse<Unit>

Notify server that the requesting account has seen notifications. Requires auth.

Link copied to clipboard

Update the service-specific admin status of a subject (account, record, or blob).

Link copied to clipboard

Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.

Link copied to clipboard
open suspend override fun uploadBlob(request: ByteArray): AtpResponse<UploadBlobResponse>

Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.