From 34ce1d0fac7b4fe51de8d344e63005841f5694f6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 4 Feb 2022 16:29:57 -0800 Subject: add support for updating more release fields --- fatcat-cli/src/entities.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/fatcat-cli/src/entities.rs b/fatcat-cli/src/entities.rs index 14c9c29..a2a571f 100644 --- a/fatcat-cli/src/entities.rs +++ b/fatcat-cli/src/entities.rs @@ -247,6 +247,12 @@ impl ApiModelMutate for models::ReleaseEntity { ("issue", val) => { self.issue = val; } + ("pages", val) => { + self.pages = val; + } + ("version", val) => { + self.version = val; + } ("number", val) => { self.number = val; } @@ -256,6 +262,20 @@ impl ApiModelMutate for models::ReleaseEntity { ("language", val) => { self.language = val; } + // extids + ("doi", val) => self.ext_ids.doi = val, + ("pmid", val) => self.ext_ids.pmid = val, + ("pmcid", val) => self.ext_ids.pmcid = val, + ("wikidata_qid", val) => self.ext_ids.wikidata_qid = val, + ("arxiv", val) => self.ext_ids.arxiv = val, + ("isbn13", val) => self.ext_ids.isbn13 = val, + ("jstor", val) => self.ext_ids.jstor = val, + ("ark", val) => self.ext_ids.ark = val, + ("doaj", val) => self.ext_ids.doaj = val, + ("dblp", val) => self.ext_ids.dblp = val, + ("oai", val) => self.ext_ids.oai = val, + ("hdl", val) => self.ext_ids.hdl = val, + // None-only fields, for now ("release_date", None) => { self.release_date = None; @@ -292,6 +312,9 @@ impl ApiModelMutate for models::ContainerEntity { ("issnp", val) => { self.issnp = val; } + ("wikidata_qid", val) => { + self.wikidata_qid = val; + } ("publication_status", val) => { self.publication_status = val; } -- cgit v1.2.3