[!NOTE] This code is mostly useable. A few things are missing, like
.post()and some other minor methods, but the majority is complete.
atproto_api
A simple ATProto implementation in Rust
AtpAgent
AtpAgent is meant for general AT Protocol operations.
Initialization
It can be initialized like this:
extern crate dotenv_codegen;
use json
use ;
async
// AtpAgent { service: "https://fjall.net/", session: None }
Get request
You can perform a get request by doing the following:
// macros
use dotenv;
use json;
use ;
async
The first parameter is a lexicon, the specific ones you can view by scrolling down to the bottom of the page and looking through the "Lexicons" section. The second parameter is a record, which is a JSON object that contains the other important information (in the case of com.atproto.repo.getRecord, that's repo, collection, and rkey).
BskyAgent
[!NOTE]
BskyAgentis currently on the backburner, as it's a superset ofAtpAgent. If for some reason you're using this library now, please useAtpAgentinstead ofBskyAgentfor the time being.
License
This code is licensed under the BSD 3-Clause license. You can view the license here.