aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/examples/client.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-15 21:17:09 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-15 21:17:09 -0700
commit0ed087be71b02d9279bd3b131131eae672580d71 (patch)
treeda4bc59d4db19ae466c86992c1e625bf0797584e /rust/fatcat-api/examples/client.rs
parent9036469324912eae3eed8cb8645f91f1a68c5857 (diff)
downloadfatcat-0ed087be71b02d9279bd3b131131eae672580d71.tar.gz
fatcat-0ed087be71b02d9279bd3b131131eae672580d71.zip
tweak openapi schema
Diffstat (limited to 'rust/fatcat-api/examples/client.rs')
-rw-r--r--rust/fatcat-api/examples/client.rs55
1 files changed, 25 insertions, 30 deletions
diff --git a/rust/fatcat-api/examples/client.rs b/rust/fatcat-api/examples/client.rs
index 8c1ec930..3302c0cd 100644
--- a/rust/fatcat-api/examples/client.rs
+++ b/rust/fatcat-api/examples/client.rs
@@ -25,10 +25,8 @@ fn main() {
.possible_values(&[
"ContainerIdGet",
"ContainerLookupGet",
- "ContainerPost",
"CreatorIdGet",
"CreatorLookupGet",
- "CreatorPost",
"EditgroupIdAcceptPost",
"EditgroupIdGet",
"EditgroupPost",
@@ -36,12 +34,9 @@ fn main() {
"EditorUsernameGet",
"FileIdGet",
"FileLookupGet",
- "FilePost",
"ReleaseIdGet",
"ReleaseLookupGet",
- "ReleasePost",
"WorkIdGet",
- "WorkPost",
])
.required(true)
.index(1),
@@ -80,11 +75,11 @@ fn main() {
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
- Some("ContainerPost") => {
- let result = client.container_post(None).wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
-
+ // Disabled because there's no example.
+ // Some("ContainerPost") => {
+ // let result = client.container_post(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("CreatorIdGet") => {
let result = client.creator_id_get("id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
@@ -95,11 +90,11 @@ fn main() {
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
- Some("CreatorPost") => {
- let result = client.creator_post(None).wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
-
+ // Disabled because there's no example.
+ // Some("CreatorPost") => {
+ // let result = client.creator_post(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("EditgroupIdAcceptPost") => {
let result = client.editgroup_id_accept_post(56).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
@@ -135,11 +130,11 @@ fn main() {
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
- Some("FilePost") => {
- let result = client.file_post(None).wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
-
+ // Disabled because there's no example.
+ // Some("FilePost") => {
+ // let result = client.file_post(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("ReleaseIdGet") => {
let result = client.release_id_get("id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
@@ -150,21 +145,21 @@ fn main() {
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
- Some("ReleasePost") => {
- let result = client.release_post(None).wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
-
+ // Disabled because there's no example.
+ // Some("ReleasePost") => {
+ // let result = client.release_post(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
Some("WorkIdGet") => {
let result = client.work_id_get("id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
- Some("WorkPost") => {
- let result = client.work_post(None).wait();
- println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
- }
-
+ // Disabled because there's no example.
+ // Some("WorkPost") => {
+ // let result = client.work_post(???).wait();
+ // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
+ // },
_ => panic!("Invalid operation provided"),
}
}