aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src/client.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-09 00:05:29 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-09 00:05:29 -0700
commitbf63870c88b5a62a2aad08929465b37d8be474dc (patch)
treeff1b2d78e9cce854563f89ab5828e63fa5f4fb94 /rust/fatcat-api-spec/src/client.rs
parent8888e6ea1af818a0a5dfb7414fa767ae176d092f (diff)
downloadfatcat-bf63870c88b5a62a2aad08929465b37d8be474dc.tar.gz
fatcat-bf63870c88b5a62a2aad08929465b37d8be474dc.zip
rust codegen
Diffstat (limited to 'rust/fatcat-api-spec/src/client.rs')
-rw-r--r--rust/fatcat-api-spec/src/client.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/rust/fatcat-api-spec/src/client.rs b/rust/fatcat-api-spec/src/client.rs
index 6d654146..c4d6b687 100644
--- a/rust/fatcat-api-spec/src/client.rs
+++ b/rust/fatcat-api-spec/src/client.rs
@@ -6020,6 +6020,8 @@ impl Api for Client {
param_core_id: Option<String>,
param_arxiv_id: Option<String>,
param_jstor_id: Option<String>,
+ param_ark_id: Option<String>,
+ param_mag_id: Option<String>,
param_expand: Option<String>,
param_hide: Option<String>,
context: &Context,
@@ -6033,11 +6035,13 @@ impl Api for Client {
let query_core_id = param_core_id.map_or_else(String::new, |query| format!("core_id={core_id}&", core_id = query.to_string()));
let query_arxiv_id = param_arxiv_id.map_or_else(String::new, |query| format!("arxiv_id={arxiv_id}&", arxiv_id = query.to_string()));
let query_jstor_id = param_jstor_id.map_or_else(String::new, |query| format!("jstor_id={jstor_id}&", jstor_id = query.to_string()));
+ let query_ark_id = param_ark_id.map_or_else(String::new, |query| format!("ark_id={ark_id}&", ark_id = query.to_string()));
+ let query_mag_id = param_mag_id.map_or_else(String::new, |query| format!("mag_id={mag_id}&", mag_id = query.to_string()));
let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string()));
let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string()));
let url = format!(
- "{}/v0/release/lookup?{doi}{wikidata_qid}{isbn13}{pmid}{pmcid}{core_id}{arxiv_id}{jstor_id}{expand}{hide}",
+ "{}/v0/release/lookup?{doi}{wikidata_qid}{isbn13}{pmid}{pmcid}{core_id}{arxiv_id}{jstor_id}{ark_id}{mag_id}{expand}{hide}",
self.base_path,
doi = utf8_percent_encode(&query_doi, QUERY_ENCODE_SET),
wikidata_qid = utf8_percent_encode(&query_wikidata_qid, QUERY_ENCODE_SET),
@@ -6047,6 +6051,8 @@ impl Api for Client {
core_id = utf8_percent_encode(&query_core_id, QUERY_ENCODE_SET),
arxiv_id = utf8_percent_encode(&query_arxiv_id, QUERY_ENCODE_SET),
jstor_id = utf8_percent_encode(&query_jstor_id, QUERY_ENCODE_SET),
+ ark_id = utf8_percent_encode(&query_ark_id, QUERY_ENCODE_SET),
+ mag_id = utf8_percent_encode(&query_mag_id, QUERY_ENCODE_SET),
expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET),
hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET)
);