ATProto
XRPC
XRPC is HTTP with some added conventions.
XRPC uses Lexicon to describe HTTP calls and maps them to /xrpc/{methodId}. For example, this API call:
code:js
await api.com.atproto.repo.listRecords({
user: 'alice.com',
collection: 'app.bsky.feed.post'
})
...maps to:
code:curl
GET /xrpc/com.atproto.repo.listRecords
?user=alice.com
&collection=app.bsky.feed.post
Decode CBOR in Java
With jackson-dataformat-cbor
code:java
ByteArrayInputStream b = new ByteArrayInputStream(data.array(),data.arrayOffset(),data.array().length);
List<DataItem> dataItems = new CborDecoder(b).decode();