diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-30 18:40:27 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-06-30 18:40:27 -0700 |
commit | c88af3a8a92329a598287b5dd3457030e3b4529f (patch) | |
tree | 12db7b14015ec028f02c1c329612552db7f8b74f /rust/fatcat-api/examples/client.rs | |
parent | 08f7f1642eb8380c5b00f6a54e4b29e55713effd (diff) | |
download | fatcat-c88af3a8a92329a598287b5dd3457030e3b4529f.tar.gz fatcat-c88af3a8a92329a598287b5dd3457030e3b4529f.zip |
generic changelog endpoints
Diffstat (limited to 'rust/fatcat-api/examples/client.rs')
-rw-r--r-- | rust/fatcat-api/examples/client.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/rust/fatcat-api/examples/client.rs b/rust/fatcat-api/examples/client.rs index eecb0c58..c79110d9 100644 --- a/rust/fatcat-api/examples/client.rs +++ b/rust/fatcat-api/examples/client.rs @@ -13,9 +13,9 @@ use clap::{App, Arg}; #[allow(unused_imports)] use fatcat::{AcceptEditgroupResponse, ApiError, ApiNoContext, ContextWrapperExt, CreateContainerBatchResponse, CreateContainerResponse, CreateCreatorBatchResponse, CreateCreatorResponse, CreateEditgroupResponse, CreateFileBatchResponse, CreateFileResponse, CreateReleaseBatchResponse, CreateReleaseResponse, CreateWorkBatchResponse, CreateWorkResponse, - GetContainerHistoryResponse, GetContainerResponse, GetCreatorHistoryResponse, GetCreatorReleasesResponse, GetCreatorResponse, GetEditgroupResponse, GetEditorChangelogResponse, - GetEditorResponse, GetFileHistoryResponse, GetFileResponse, GetReleaseFilesResponse, GetReleaseHistoryResponse, GetReleaseResponse, GetStatsResponse, GetWorkHistoryResponse, - GetWorkReleasesResponse, GetWorkResponse, LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse}; + GetChangelogEntryResponse, GetChangelogResponse, GetContainerHistoryResponse, GetContainerResponse, GetCreatorHistoryResponse, GetCreatorReleasesResponse, GetCreatorResponse, + GetEditgroupResponse, GetEditorChangelogResponse, GetEditorResponse, GetFileHistoryResponse, GetFileResponse, GetReleaseFilesResponse, GetReleaseHistoryResponse, GetReleaseResponse, + GetStatsResponse, GetWorkHistoryResponse, GetWorkReleasesResponse, GetWorkResponse, LookupContainerResponse, LookupCreatorResponse, LookupFileResponse, LookupReleaseResponse}; #[allow(unused_imports)] use futures::{future, stream, Future, Stream}; @@ -31,6 +31,8 @@ fn main() { "CreateFileBatch", "CreateReleaseBatch", "CreateWorkBatch", + "GetChangelog", + "GetChangelogEntry", "GetContainer", "GetContainerHistory", "GetCreator", @@ -141,6 +143,16 @@ fn main() { println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); } + Some("GetChangelog") => { + let result = client.get_changelog(Some(789)).wait(); + println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); + } + + Some("GetChangelogEntry") => { + let result = client.get_changelog_entry(789).wait(); + println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); + } + Some("GetContainer") => { let result = client.get_container("id_example".to_string()).wait(); println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); |