diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-17 17:01:23 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-17 17:01:23 -0700 |
commit | c1613504dbe96951ae59889fc11b0564cfbbcd83 (patch) | |
tree | 9c4aedd480e463a40691ac3cdd50d43fbe15fffe /rust/fatcat-api/examples/client.rs | |
parent | f3241d35dbb445b7e3c15f1759431580d830bffe (diff) | |
download | fatcat-c1613504dbe96951ae59889fc11b0564cfbbcd83.tar.gz fatcat-c1613504dbe96951ae59889fc11b0564cfbbcd83.zip |
update fatcat-api with openapi change
Diffstat (limited to 'rust/fatcat-api/examples/client.rs')
-rw-r--r-- | rust/fatcat-api/examples/client.rs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/rust/fatcat-api/examples/client.rs b/rust/fatcat-api/examples/client.rs index ebbff568..cf53eb75 100644 --- a/rust/fatcat-api/examples/client.rs +++ b/rust/fatcat-api/examples/client.rs @@ -13,8 +13,8 @@ use clap::{App, Arg}; #[allow(unused_imports)] use fatcat::{AcceptEditgroupResponse, ApiError, ApiNoContext, ContextWrapperExt, CreateContainerBatchResponse, CreateContainerResponse, CreateCreatorBatchResponse, CreateCreatorResponse, CreateEditgroupResponse, CreateFileBatchResponse, CreateFileResponse, CreateReleaseBatchResponse, CreateReleaseResponse, CreateWorkBatchResponse, CreateWorkResponse, - GetContainerResponse, GetCreatorResponse, GetEditgroupResponse, GetEditorChangelogResponse, GetEditorResponse, GetFileResponse, GetReleaseResponse, GetWorkResponse, - LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse}; + GetContainerResponse, GetCreatorReleasesResponse, GetCreatorResponse, GetEditgroupResponse, GetEditorChangelogResponse, GetEditorResponse, GetFileResponse, GetReleaseFilesResponse, + GetReleaseResponse, GetWorkReleasesResponse, GetWorkResponse, LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse}; #[allow(unused_imports)] use futures::{future, stream, Future, Stream}; @@ -32,12 +32,15 @@ fn main() { "CreateWorkBatch", "GetContainer", "GetCreator", + "GetCreatorReleases", "GetEditgroup", "GetEditor", "GetEditorChangelog", "GetFile", "GetRelease", + "GetReleaseFiles", "GetWork", + "GetWorkReleases", "LookupContainer", "LookupCreator", "LookupFile", @@ -141,6 +144,11 @@ fn main() { println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); } + Some("GetCreatorReleases") => { + let result = client.get_creator_releases("id_example".to_string()).wait(); + println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); + } + Some("GetEditgroup") => { let result = client.get_editgroup(789).wait(); println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); @@ -166,11 +174,21 @@ fn main() { println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); } + Some("GetReleaseFiles") => { + let result = client.get_release_files("id_example".to_string()).wait(); + println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); + } + Some("GetWork") => { let result = client.get_work("id_example".to_string()).wait(); println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); } + Some("GetWorkReleases") => { + let result = client.get_work_releases("id_example".to_string()).wait(); + println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); + } + Some("LookupContainer") => { let result = client.lookup_container("issnl_example".to_string()).wait(); println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); |