Crates.io | vgmdb |
lib.rs | vgmdb |
version | 0.5.0 |
source | src |
created_at | 2015-06-21 17:42:37.765914 |
updated_at | 2022-12-31 16:18:32.530399 |
description | vgmdb api |
homepage | https://github.com/Bilalh/vgmdb-rust |
repository | https://github.com/Bilalh/vgmdb-rust |
max_upload_size | |
id | 2438 |
size | 218,797 |
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(())
}