Exosphere.Bsky.Draft (Exosphere v0.6.0)

Copy Markdown View Source

XRPC client functions for the app.bsky.draft namespace.

Generated from vendored lexicons — DO NOT EDIT.

Endpoints

  • create_draft — procedure: app.bsky.draft.createDraft
  • delete_draft — procedure: app.bsky.draft.deleteDraft
  • get_drafts — query: app.bsky.draft.getDrafts
  • update_draft — procedure: app.bsky.draft.updateDraft

Summary

Functions

Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.

Deletes a draft by ID. Requires authentication.

Gets views of user drafts. Requires authentication.

Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.

Functions

create_draft(client, body \\ %{})

@spec create_draft(Exosphere.ATProto.XRPC.Client.t(), map()) ::
  {:ok, map()} | {:error, term()}

Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.

delete_draft(client, body \\ %{})

@spec delete_draft(Exosphere.ATProto.XRPC.Client.t(), map()) ::
  {:ok, map()} | {:error, term()}

Deletes a draft by ID. Requires authentication.

get_drafts(client, params \\ [])

@spec get_drafts(Exosphere.ATProto.XRPC.Client.t(), map() | keyword()) ::
  {:ok, map()} | {:error, term()}

Gets views of user drafts. Requires authentication.

## Parameters

  • cursor (string, optional)
  • limit (integer, optional)

update_draft(client, body \\ %{})

@spec update_draft(Exosphere.ATProto.XRPC.Client.t(), map()) ::
  {:ok, map()} | {:error, term()}

Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.