vgmdb

Crates.iovgmdb
lib.rsvgmdb
version0.5.0
sourcesrc
created_at2015-06-21 17:42:37.765914
updated_at2022-12-31 16:18:32.530399
descriptionvgmdb api
homepagehttps://github.com/Bilalh/vgmdb-rust
repositoryhttps://github.com/Bilalh/vgmdb-rust
max_upload_size
id2438
size218,797
Bilal Syed Hussain (Bilalh)

documentation

README

vgmdb

Libary for https://vgmdb.net in rust.

Requires an async runtime.

Example usage:

  • Get album by its id.
use vgmdb::{
    types::{albums::Album, VgmdbError},
    VgmdbClient,
};

#[tokio::main]
async fn main() -> Result<(), VgmdbError> {
    let client = VgmdbClient::new();
    let data: Album = client.get_album(1547).await?;
    dbg!(data);

    Ok(())
}
  • Search for albums by name
use vgmdb::{
    types::{search::Album, VgmdbError},
    VgmdbClient,
};

#[tokio::main]
async fn main() -> Result<(), VgmdbError>{
    let client = VgmdbClient::new();
    let data: Vec<Album> = client.search_albums("voice of a distant star").await?;
    dbg!(&data);
    dbg!(&data[0].album_id());

    Ok(())
}
Commit count: 15

cargo fmt