dev.knotless.getPreferences

lexicons.knotless.dev

Documentation

The asking account's preferences, as the appview keeps them, apart from any record: one of each kind, of those it has set, and always its notifications, which dev.knotless.listNotifications and getUnreadCount follow. A kind it has not set a reader takes as its default. The pages' login copies what they act on into the browser. Requires authentication: a service token, or the session cookie the pages' login sets.

main query

The asking account's preferences, as the appview keeps them, apart from any record: one of each kind, of those it has set, and always its notifications, which dev.knotless.listNotifications and getUnreadCount follow. A kind it has not set a reader takes as its default. The pages' login copies what they act on into the browser. Requires authentication: a service token, or the session cookie the pages' login sets.

Output

Encodingapplication/json

Errors

AuthenticationRequired No account asks.
NotFound This appview keeps no index, so it keeps no preferences.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
View raw schema
{
  "description": "The asking account's preferences, as the appview keeps them, apart from any record: one of each kind, of those it has set, and always its notifications, which dev.knotless.listNotifications and getUnreadCount follow. A kind it has not set a reader takes as its default. The pages' login copies what they act on into the browser. Requires authentication: a service token, or the session cookie the pages' login sets.",
  "errors": [
    {
      "description": "No account asks.",
      "name": "AuthenticationRequired"
    },
    {
      "description": "This appview keeps no index, so it keeps no preferences.",
      "name": "NotFound"
    }
  ],
  "output": {
    "encoding": "application/json",
    "schema": {
      "ref": "#preferences",
      "type": "ref"
    }
  },
  "type": "query"
}
appearancePref object

How the pages are drawn for the account.

Properties

theme string Optional

The colours the pages are drawn in, as their Appearance settings name them. Absent, or one the pages do not know, they follow the system's light or dark.

maxLength: 64 bytes
Known values: light, dark, latte, mocha, dracula, pckt, plyr, blacksky
View raw schema
{
  "description": "How the pages are drawn for the account.",
  "properties": {
    "theme": {
      "description": "The colours the pages are drawn in, as their Appearance settings name them. Absent, or one the pages do not know, they follow the system's light or dark.",
      "knownValues": [
        "light",
        "dark",
        "latte",
        "mocha",
        "dracula",
        "pckt",
        "plyr",
        "blacksky"
      ],
      "maxLength": 64,
      "type": "string"
    }
  },
  "type": "object"
}
notificationPref object

Which notifications the account hears of. Until it says, every reason, from anyone.

Properties

followedOnly boolean Optional

Whether it hears only of what accounts it follows on knotless did. Not, when absent.

reasons array of ref#notificationReason Optional

Reasons a notification is given for, each on or off. Given back, every one dev.knotless.listNotifications gives; set, one not named is on.

maxLength: 64 items
View raw schema
{
  "description": "Which notifications the account hears of. Until it says, every reason, from anyone.",
  "properties": {
    "followedOnly": {
      "description": "Whether it hears only of what accounts it follows on knotless did. Not, when absent.",
      "type": "boolean"
    },
    "reasons": {
      "description": "Reasons a notification is given for, each on or off. Given back, every one dev.knotless.listNotifications gives; set, one not named is on.",
      "items": {
        "ref": "#notificationReason",
        "type": "ref"
      },
      "maxLength": 64,
      "type": "array"
    }
  },
  "type": "object"
}
notificationReason object

Whether an account hears of one reason's notifications.

Properties

enabled boolean Required

Whether it hears of them.

reason string Required

A reason, as dev.knotless.listNotifications#notification gives it.

maxLength: 64 bytes
Known values: star, follow, pull, issue, comment, mention, review-requested
View raw schema
{
  "description": "Whether an account hears of one reason's notifications.",
  "properties": {
    "enabled": {
      "description": "Whether it hears of them.",
      "type": "boolean"
    },
    "reason": {
      "description": "A reason, as dev.knotless.listNotifications#notification gives it.",
      "knownValues": [
        "star",
        "follow",
        "pull",
        "issue",
        "comment",
        "mention",
        "review-requested"
      ],
      "maxLength": 64,
      "type": "string"
    }
  },
  "required": [
    "reason",
    "enabled"
  ],
  "type": "object"
}
preferences object

An account's preferences, each of a kind.

Properties

preferences array of union Required

At most one of each kind. Kinds unknown to a reader are passed over.

maxLength: 32 items
View raw schema
{
  "description": "An account's preferences, each of a kind.",
  "properties": {
    "preferences": {
      "description": "At most one of each kind. Kinds unknown to a reader are passed over.",
      "items": {
        "refs": [
          "#appearancePref",
          "#notificationPref"
        ],
        "type": "union"
      },
      "maxLength": 32,
      "type": "array"
    }
  },
  "required": [
    "preferences"
  ],
  "type": "object"
}

Lexicon Garden

@