-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): Add namespace features (#174)
* Update codegen: add namespace features * Update API, generated by new codegen * Update dependencies * Update workflows * Update README
- Loading branch information
Showing
14 changed files
with
343 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |
} | ||
``` | ||
|
||
### `AtpAgent` | ||
### `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. | ||
|
||
|
@@ -53,14 +53,20 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | |
agent.login("[email protected]", "hunter2").await?; | ||
let result = agent | ||
.api | ||
.app | ||
.bsky | ||
.actor | ||
.get_profile(atrium_api::app::bsky::actor::get_profile::Parameters { | ||
actor: "bsky.app".parse()?, | ||
}) | ||
.com | ||
.atproto | ||
.server | ||
.get_session() | ||
.await?; | ||
println!("{:?}", result); | ||
Ok(()) | ||
} | ||
``` | ||
|
||
## 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 the `agent` module. | ||
- `bluesky`: enable bluesky-specific lexicon definitions and XRPC methods. | ||
- It is also possible to enable only the namespace specified by `namespace-*`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.