src/types: all metadata fields made public, renamed item_type to type_name
@@ -3,28 +3,28 @@ use serde_derive::*;
#[derive(PartialEq, Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MetaPreview {
- id: String,
+ pub id: String,
#[serde(rename = "type")]
- item_type: String,
- name: String,
- poster: Option<String>,
+ pub type_name: String,
+ pub name: String,
+ pub poster: Option<String>,
}
// @TODO: should we derive Hash, Eq?
#[derive(PartialEq, Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MetaItem {
- id: String,
+ pub id: String,
#[serde(rename = "type")]
- item_type: String,
- name: String,
- poster: Option<String>,
- background: Option<String>,
- logo: Option<String>,
+ pub type_name: String,
+ pub name: String,
+ pub poster: Option<String>,
+ pub background: Option<String>,
+ pub logo: Option<String>,
#[serde(default)]
- popularity: f64,
- description: Option<String>,
- release_info: Option<String>,
+ pub popularity: f64,
+ pub description: Option<String>,
+ pub release_info: Option<String>,
// @TODO: other
// @TODO videos
// @TODO crew
