-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Mention chaining requests in README
- Loading branch information
1 parent
d4a8f46
commit 307b938
Showing
3 changed files
with
52 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use freedom_api::prelude::*; | ||
use freedom_config::Config; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let atlas_config = Config::from_env()?; | ||
let atlas_client = Client::from_config(atlas_config); | ||
|
||
let site_from_request: Site = atlas_client | ||
.get_request_by_id(42) | ||
.await? | ||
.into_inner() | ||
.get_site(&atlas_client) | ||
.await?; | ||
|
||
println!("{:?}", site_from_request); | ||
|
||
Ok(()) | ||
} |
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