ATrium API: Rust library for Bluesky's atproto services
ATrium API is a Rust library that includes the definitions of XRPC requests and their associated input/output model types. These codes are generated from the Lexicon schema on atproto.com.
Usage
Any HTTP client that implements atrium_xrpc::HttpClient
can be used to handle XRPC requests. Since atrium_xrpc_client
provides several implementations, it is recommended to use one of them that fits your project requirements.
use AtpServiceClient;
use ReqwestClient;
async
AtpAgent
(agent
feature)
While AtpServiceClient
can be used for simple XRPC calls, it is better to use AtpAgent
, which has practical features such as session management.
use ;
use ReqwestClient;
async
Features
The AtpAgent
used in the above example is included in the agent
feature. atrium-api enables the agent
and bluesky
features by default. It is possible to opt-out if not needed.
agent
: enable theagent
module.bluesky
: enable bluesky-specific lexicon definitions and XRPC methods.- It is also possible to enable only the namespace specified by
namespace-*
.
- It is also possible to enable only the namespace specified by