freedom-api 3.2.0

Freedom API for Rustaceans
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use freedom_api::prelude::*;
use futures::StreamExt;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::from_env()?;
    let accounts = client
        .get_accounts()
        .filter_map(|result| async move { result.ok() })
        .map(|container| container.into_inner())
        .collect::<Vec<_>>()
        .await;

    println!("{:#?}", accounts);

    Ok(())
}