com.atiproto.repo.item.count

atiproto.com

Documentation

Count active (completed) items. If recordUri is provided, counts items for that record. If subject is provided, counts items received by that DID. If neither is provided, counts items sent by the authenticated user. Optionally filtered by a start/end datetime window. When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts.

main query

Count active (completed) items. If recordUri is provided, counts items for that record. If subject is provided, counts items received by that DID. If neither is provided, counts items sent by the authenticated user. Optionally filtered by a start/end datetime window. When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts.

Parameters

endDate string datetime Optional

Only count items completed at or before this timestamp

recordUri string at-uri Optional

AT-URI of the record being tipped. Takes precedence over subject.

startDate string datetime Optional

Only count items completed at or after this timestamp

subject string did Optional

DID of the item recipient. Ignored if recordUri is provided. If omitted (and recordUri is omitted), the query counts items sent by the authenticated user.

Output

Encodingapplication/json
amount integer Optional

Sum of all item amounts in cents. Only returned when the authenticated user is the subject/owner of the target (or when counting their own sent items).

count integer Required

Number of active (completed) items matching the filter

currency string Optional

Currency of the summed amount. Only returned when the authenticated user is the subject/owner of the target (or when counting their own sent items).

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)
Parameters
Only count items completed at or before this timestamp
AT-URI of the record being tipped. Takes precedence over subject.
Only count items completed at or after this timestamp
DID of the item recipient. Ignored if recordUri is provided. If omitted (and recordUri is omitted), the query counts items sent by the authenticated user.
View raw schema
{
  "type": "query",
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "description": "Number of active (completed) items matching the filter"
        },
        "amount": {
          "type": "integer",
          "description": "Sum of all item amounts in cents. Only returned when the authenticated user is the subject/owner of the target (or when counting their own sent items)."
        },
        "currency": {
          "type": "string",
          "maxLength": 3,
          "description": "Currency of the summed amount. Only returned when the authenticated user is the subject/owner of the target (or when counting their own sent items)."
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "properties": {
      "endDate": {
        "type": "string",
        "format": "datetime",
        "description": "Only count items completed at or before this timestamp"
      },
      "subject": {
        "type": "string",
        "format": "did",
        "description": "DID of the item recipient. Ignored if recordUri is provided. If omitted (and recordUri is omitted), the query counts items sent by the authenticated user."
      },
      "recordUri": {
        "type": "string",
        "format": "at-uri",
        "description": "AT-URI of the record being tipped. Takes precedence over subject."
      },
      "startDate": {
        "type": "string",
        "format": "datetime",
        "description": "Only count items completed at or after this timestamp"
      }
    }
  },
  "description": "Count active (completed) items. If recordUri is provided, counts items for that record. If subject is provided, counts items received by that DID. If neither is provided, counts items sent by the authenticated user. Optionally filtered by a start/end datetime window. When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts."
}

Lexicon Garden

@