From a4e45f77b5431e0211337afc67ee586c553590d3 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 25 Jul 2018 12:17:34 -0700 Subject: actually add wikidata QIDs to the API --- rust/fatcat-api/src/models.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'rust/fatcat-api/src/models.rs') diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs index d798fe03..3ae9b1fa 100644 --- a/rust/fatcat-api/src/models.rs +++ b/rust/fatcat-api/src/models.rs @@ -46,6 +46,10 @@ pub struct ContainerEntity { #[serde(skip_serializing_if = "Option::is_none")] pub abbrev: Option, + #[serde(rename = "wikidata_qid")] + #[serde(skip_serializing_if = "Option::is_none")] + pub wikidata_qid: Option, + #[serde(rename = "issnl")] #[serde(skip_serializing_if = "Option::is_none")] pub issnl: Option, @@ -88,6 +92,7 @@ impl ContainerEntity { ContainerEntity { coden: None, abbrev: None, + wikidata_qid: None, issnl: None, publisher: None, name: name, @@ -103,6 +108,10 @@ impl ContainerEntity { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CreatorEntity { + #[serde(rename = "wikidata_qid")] + #[serde(skip_serializing_if = "Option::is_none")] + pub wikidata_qid: Option, + #[serde(rename = "orcid")] #[serde(skip_serializing_if = "Option::is_none")] pub orcid: Option, @@ -147,6 +156,7 @@ pub struct CreatorEntity { impl CreatorEntity { pub fn new(display_name: String) -> CreatorEntity { CreatorEntity { + wikidata_qid: None, orcid: None, surname: None, given_name: None, @@ -483,6 +493,10 @@ pub struct ReleaseEntity { #[serde(skip_serializing_if = "Option::is_none")] pub volume: Option, + #[serde(rename = "wikidata_qid")] + #[serde(skip_serializing_if = "Option::is_none")] + pub wikidata_qid: Option, + #[serde(rename = "pmcid")] #[serde(skip_serializing_if = "Option::is_none")] pub pmcid: Option, @@ -559,6 +573,7 @@ impl ReleaseEntity { pages: None, issue: None, volume: None, + wikidata_qid: None, pmcid: None, pmid: None, isbn13: None, -- cgit v1.2.3