rustemon 2.2.0

Library wrapping the awesome PokeAPI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use rustemon::Follow;

#[tokio::main]
async fn main() {
    let rustemon_client = rustemon::client::RustemonClient::default();
    let pokemon = rustemon::pokemon::pokemon::get_by_name("charizard", &rustemon_client).await;
    let species_resource = pokemon.unwrap().species.unwrap();
    let species = species_resource.follow(&rustemon_client).await;
    println!("{:#?}", species);

    let evolution_chain = species
        .unwrap()
        .evolution_chain
        .unwrap()
        .follow(&rustemon_client)
        .await;
    println!("{:#?}", evolution_chain);
}