aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat-openapi/examples/client/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat-openapi/examples/client/main.rs')
-rw-r--r--fatcat-openapi/examples/client/main.rs21
1 files changed, 17 insertions, 4 deletions
diff --git a/fatcat-openapi/examples/client/main.rs b/fatcat-openapi/examples/client/main.rs
index 14a1bdf..716cbe1 100644
--- a/fatcat-openapi/examples/client/main.rs
+++ b/fatcat-openapi/examples/client/main.rs
@@ -29,10 +29,10 @@ use fatcat_openapi::{
GetWebcaptureHistoryResponse, GetWebcaptureRedirectsResponse, GetWebcaptureResponse,
GetWebcaptureRevisionResponse, GetWorkEditResponse, GetWorkHistoryResponse,
GetWorkRedirectsResponse, GetWorkReleasesResponse, GetWorkResponse, GetWorkRevisionResponse,
- LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse,
- UpdateContainerResponse, UpdateCreatorResponse, UpdateEditgroupResponse, UpdateEditorResponse,
- UpdateFileResponse, UpdateFilesetResponse, UpdateReleaseResponse, UpdateWebcaptureResponse,
- UpdateWorkResponse,
+ LookupContainerResponse, LookupCreatorResponse, LookupEditorResponse, LookupFileResponse,
+ LookupReleaseResponse, UpdateContainerResponse, UpdateCreatorResponse, UpdateEditgroupResponse,
+ UpdateEditorResponse, UpdateFileResponse, UpdateFilesetResponse, UpdateReleaseResponse,
+ UpdateWebcaptureResponse, UpdateWorkResponse,
};
#[allow(unused_imports)]
use futures::{future, stream, Stream};
@@ -128,6 +128,7 @@ fn main() {
"GetWorkRevision",
"LookupContainer",
"LookupCreator",
+ "LookupEditor",
"LookupFile",
"LookupRelease",
])
@@ -991,6 +992,9 @@ fn main() {
Some("LookupContainer") => {
let result = rt.block_on(client.lookup_container(
Some("issnl_example".to_string()),
+ Some("issne_example".to_string()),
+ Some("issnp_example".to_string()),
+ Some("issn_example".to_string()),
Some("wikidata_qid_example".to_string()),
Some("expand_example".to_string()),
Some("hide_example".to_string()),
@@ -1014,6 +1018,14 @@ fn main() {
(client.context() as &dyn Has<XSpanIdString>).get().clone()
);
}
+ Some("LookupEditor") => {
+ let result = rt.block_on(client.lookup_editor(Some("username_example".to_string())));
+ info!(
+ "{:?} (X-Span-ID: {:?})",
+ result,
+ (client.context() as &dyn Has<XSpanIdString>).get().clone()
+ );
+ }
Some("LookupFile") => {
let result = rt.block_on(client.lookup_file(
Some("md5_example".to_string()),
@@ -1043,6 +1055,7 @@ fn main() {
Some("doaj_example".to_string()),
Some("dblp_example".to_string()),
Some("oai_example".to_string()),
+ Some("hdl_example".to_string()),
Some("expand_example".to_string()),
Some("hide_example".to_string()),
));