diff options
Diffstat (limited to 'rust/fatcat-api-spec/src/client.rs')
-rw-r--r-- | rust/fatcat-api-spec/src/client.rs | 78 |
1 files changed, 63 insertions, 15 deletions
diff --git a/rust/fatcat-api-spec/src/client.rs b/rust/fatcat-api-spec/src/client.rs index a3e97fb3..6d654146 100644 --- a/rust/fatcat-api-spec/src/client.rs +++ b/rust/fatcat-api-spec/src/client.rs @@ -272,17 +272,23 @@ impl Api for Client { param_entity_list: &Vec<models::ContainerEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateContainerBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/container/batch?{autoaccept}{editgroup_id}", + "{}/v0/container/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -1167,17 +1173,23 @@ impl Api for Client { param_entity_list: &Vec<models::CreatorEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateCreatorBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/creator/batch?{autoaccept}{editgroup_id}", + "{}/v0/creator/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -3364,17 +3376,23 @@ impl Api for Client { param_entity_list: &Vec<models::FileEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateFileBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/file/batch?{autoaccept}{editgroup_id}", + "{}/v0/file/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -4256,17 +4274,23 @@ impl Api for Client { param_entity_list: &Vec<models::FilesetEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateFilesetBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/fileset/batch?{autoaccept}{editgroup_id}", + "{}/v0/fileset/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -5071,17 +5095,23 @@ impl Api for Client { param_entity_list: &Vec<models::ReleaseEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateReleaseBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/release/batch?{autoaccept}{editgroup_id}", + "{}/v0/release/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -5988,6 +6018,8 @@ impl Api for Client { param_pmid: Option<String>, param_pmcid: Option<String>, param_core_id: Option<String>, + param_arxiv_id: Option<String>, + param_jstor_id: Option<String>, param_expand: Option<String>, param_hide: Option<String>, context: &Context, @@ -5999,11 +6031,13 @@ impl Api for Client { let query_pmid = param_pmid.map_or_else(String::new, |query| format!("pmid={pmid}&", pmid = query.to_string())); let query_pmcid = param_pmcid.map_or_else(String::new, |query| format!("pmcid={pmcid}&", pmcid = query.to_string())); 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_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}{expand}{hide}", + "{}/v0/release/lookup?{doi}{wikidata_qid}{isbn13}{pmid}{pmcid}{core_id}{arxiv_id}{jstor_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), @@ -6011,6 +6045,8 @@ impl Api for Client { pmid = utf8_percent_encode(&query_pmid, QUERY_ENCODE_SET), pmcid = utf8_percent_encode(&query_pmcid, QUERY_ENCODE_SET), 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), expand = utf8_percent_encode(&query_expand, QUERY_ENCODE_SET), hide = utf8_percent_encode(&query_hide, QUERY_ENCODE_SET) ); @@ -6272,17 +6308,23 @@ impl Api for Client { param_entity_list: &Vec<models::WebcaptureEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateWebcaptureBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/webcapture/batch?{autoaccept}{editgroup_id}", + "{}/v0/webcapture/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); @@ -6993,17 +7035,23 @@ impl Api for Client { param_entity_list: &Vec<models::WorkEntity>, param_autoaccept: Option<bool>, param_editgroup_id: Option<String>, + param_description: Option<String>, + param_extra: Option<String>, context: &Context, ) -> Box<Future<Item = CreateWorkBatchResponse, Error = ApiError> + Send> { // Query parameters let query_autoaccept = param_autoaccept.map_or_else(String::new, |query| format!("autoaccept={autoaccept}&", autoaccept = query.to_string())); let query_editgroup_id = param_editgroup_id.map_or_else(String::new, |query| format!("editgroup_id={editgroup_id}&", editgroup_id = query.to_string())); + let query_description = param_description.map_or_else(String::new, |query| format!("description={description}&", description = query.to_string())); + let query_extra = param_extra.map_or_else(String::new, |query| format!("extra={extra}&", extra = query.to_string())); let url = format!( - "{}/v0/work/batch?{autoaccept}{editgroup_id}", + "{}/v0/work/batch?{autoaccept}{editgroup_id}{description}{extra}", self.base_path, autoaccept = utf8_percent_encode(&query_autoaccept, QUERY_ENCODE_SET), - editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET) + editgroup_id = utf8_percent_encode(&query_editgroup_id, QUERY_ENCODE_SET), + description = utf8_percent_encode(&query_description, QUERY_ENCODE_SET), + extra = utf8_percent_encode(&query_extra, QUERY_ENCODE_SET) ); let body = serde_json::to_string(¶m_entity_list).expect("impossible to fail to serialize"); |