aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-07-25 12:17:34 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-07-25 12:17:34 -0700
commita4e45f77b5431e0211337afc67ee586c553590d3 (patch)
treedd82f9f3a515bc5a1b6431276ecf089e0c20a3f9 /rust/fatcat-api/src
parent8630a99c0c6351f5d4a051ce0c38b162f46b62ae (diff)
downloadfatcat-a4e45f77b5431e0211337afc67ee586c553590d3.tar.gz
fatcat-a4e45f77b5431e0211337afc67ee586c553590d3.zip
actually add wikidata QIDs to the API
Diffstat (limited to 'rust/fatcat-api/src')
-rw-r--r--rust/fatcat-api/src/models.rs15
1 files changed, 15 insertions, 0 deletions
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<String>,
+ #[serde(rename = "wikidata_qid")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub wikidata_qid: Option<String>,
+
#[serde(rename = "issnl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub issnl: Option<String>,
@@ -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<String>,
+
#[serde(rename = "orcid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub orcid: Option<String>,
@@ -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<String>,
+ #[serde(rename = "wikidata_qid")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub wikidata_qid: Option<String>,
+
#[serde(rename = "pmcid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pmcid: Option<String>,
@@ -559,6 +573,7 @@ impl ReleaseEntity {
pages: None,
issue: None,
volume: None,
+ wikidata_qid: None,
pmcid: None,
pmid: None,
isbn13: None,