diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-18 20:05:39 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-18 20:36:06 -0700 |
commit | c0ad5f80c13fc66240a17e59dfff559c6967aac7 (patch) | |
tree | 2e8a0174bd2afda64362c7c9b07e88ce35997a2c /rust/fatcat-openapi/examples/client.rs | |
parent | bba9af573a7e6098e4fec13892e939e395c8d62f (diff) | |
download | fatcat-c0ad5f80c13fc66240a17e59dfff559c6967aac7.tar.gz fatcat-c0ad5f80c13fc66240a17e59dfff559c6967aac7.zip |
rust codegen (with rustfix, compiles 2018 edition)
Diffstat (limited to 'rust/fatcat-openapi/examples/client.rs')
-rw-r--r-- | rust/fatcat-openapi/examples/client.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/rust/fatcat-openapi/examples/client.rs b/rust/fatcat-openapi/examples/client.rs index d7b3965f..5ed6122a 100644 --- a/rust/fatcat-openapi/examples/client.rs +++ b/rust/fatcat-openapi/examples/client.rs @@ -1,7 +1,6 @@ #![allow(missing_docs, unused_variables, trivial_casts)] -extern crate clap; -extern crate fatcat; +use fatcat_openapi; #[allow(unused_extern_crates)] extern crate futures; #[allow(unused_extern_crates)] @@ -11,7 +10,7 @@ extern crate uuid; use clap::{App, Arg}; #[allow(unused_imports)] -use fatcat::{ +use fatcat_openapi::{ AcceptEditgroupResponse, ApiError, ApiNoContext, AuthCheckResponse, AuthOidcResponse, ContextWrapperExt, CreateAuthTokenResponse, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse, CreateCreatorResponse, CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse, CreateReleaseAutoBatchResponse, CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, @@ -123,14 +122,14 @@ fn main() { ); let client = if is_https { // Using Simple HTTPS - fatcat::Client::try_new_https(&base_url, "examples/ca.pem").expect("Failed to create HTTPS client") + fatcat_openapi::Client::try_new_https(&base_url, "examples/ca.pem").expect("Failed to create HTTPS client") } else { // Using HTTP - fatcat::Client::try_new_http(&base_url).expect("Failed to create HTTP client") + fatcat_openapi::Client::try_new_http(&base_url).expect("Failed to create HTTP client") }; // Using a non-default `Context` is not required; this is just an example! - let client = client.with_context(fatcat::Context::new_with_span_id(self::uuid::Uuid::new_v4().to_string())); + let client = client.with_context(fatcat_openapi::Context::new_with_span_id(self::uuid::Uuid::new_v4().to_string())); match matches.value_of("operation") { Some("AuthCheck") => { |