vgmdb
Libary for https://vgmdb.net in rust.
Requires an async runtime.
Example usage:
- Get album by its id.
use ;
async
- Search for albums by name
use ;
async
Libary for https://vgmdb.net in rust.
Requires an async runtime.
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(())
}
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(())
}