6 releases (3 breaking)

0.5.0 Dec 31, 2022
0.4.2 Dec 28, 2022
0.3.1 Sep 2, 2016
0.3.0 Jun 21, 2015
0.2.2 Jun 21, 2015

#6 in #album

Apache-2.0

38KB
304 lines

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(())
}

Dependencies

~4–18MB
~257K SLoC