Add missing field 'anime' to theme

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/2/head
trivernis 4 years ago
parent 247f709337
commit f172ae64ce
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

2
Cargo.lock generated

@ -2,7 +2,7 @@
# It is not intended for manual editing. # It is not intended for manual editing.
[[package]] [[package]]
name = "animethemes-rs" name = "animethemes-rs"
version = "0.2.0" version = "0.2.1"
dependencies = [ dependencies = [
"reqwest", "reqwest",
"serde", "serde",

@ -1,6 +1,6 @@
[package] [package]
name = "animethemes-rs" name = "animethemes-rs"
version = "0.2.0" version = "0.2.1"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
readme = "README.md" readme = "README.md"

@ -91,6 +91,7 @@ pub struct ThemeEntry {
pub spoiler: bool, pub spoiler: bool,
pub notes: String, pub notes: String,
pub videos: Option<Vec<Video>>, pub videos: Option<Vec<Video>>,
pub theme: Option<Theme>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]

@ -36,9 +36,10 @@ async fn it_returns_artists_by_slug() {
#[tokio::test] #[tokio::test]
async fn it_returns_entries_by_id() { async fn it_returns_entries_by_id() {
let client = AnimeThemesClient::default(); let client = AnimeThemesClient::default();
let result = client.entry(11948, &["videos"]).await.unwrap(); let result = client.entry(11948, &["videos", "theme"]).await.unwrap();
assert!(result.videos.is_some()) assert!(result.videos.is_some());
assert!(result.theme.is_some());
} }
#[tokio::test] #[tokio::test]

Loading…
Cancel
Save