summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/examples
diff options
context:
space:
mode:
Diffstat (limited to 'rust/fatcat-api-spec/examples')
-rw-r--r--rust/fatcat-api-spec/examples/client.rs28
-rw-r--r--rust/fatcat-api-spec/examples/server_lib/server.rs56
2 files changed, 42 insertions, 42 deletions
diff --git a/rust/fatcat-api-spec/examples/client.rs b/rust/fatcat-api-spec/examples/client.rs
index 52a9e16a..bf0c07b3 100644
--- a/rust/fatcat-api-spec/examples/client.rs
+++ b/rust/fatcat-api-spec/examples/client.rs
@@ -149,7 +149,7 @@ fn main() {
}
Some("DeleteContainerEdit") => {
- let result = client.delete_container_edit(789).wait();
+ let result = client.delete_container_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -161,7 +161,7 @@ fn main() {
}
Some("GetContainerEdit") => {
- let result = client.get_container_edit(789).wait();
+ let result = client.get_container_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -216,7 +216,7 @@ fn main() {
}
Some("DeleteCreatorEdit") => {
- let result = client.delete_creator_edit(789).wait();
+ let result = client.delete_creator_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -228,7 +228,7 @@ fn main() {
}
Some("GetCreatorEdit") => {
- let result = client.get_creator_edit(789).wait();
+ let result = client.get_creator_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -322,7 +322,7 @@ fn main() {
}
Some("DeleteFileEdit") => {
- let result = client.delete_file_edit(789).wait();
+ let result = client.delete_file_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -334,7 +334,7 @@ fn main() {
}
Some("GetFileEdit") => {
- let result = client.get_file_edit(789).wait();
+ let result = client.get_file_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -390,7 +390,7 @@ fn main() {
}
Some("DeleteFilesetEdit") => {
- let result = client.delete_fileset_edit(789).wait();
+ let result = client.delete_fileset_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -402,7 +402,7 @@ fn main() {
}
Some("GetFilesetEdit") => {
- let result = client.get_fileset_edit(789).wait();
+ let result = client.get_fileset_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -450,7 +450,7 @@ fn main() {
}
Some("DeleteReleaseEdit") => {
- let result = client.delete_release_edit(789).wait();
+ let result = client.delete_release_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -462,7 +462,7 @@ fn main() {
}
Some("GetReleaseEdit") => {
- let result = client.get_release_edit(789).wait();
+ let result = client.get_release_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -536,7 +536,7 @@ fn main() {
}
Some("DeleteWebcaptureEdit") => {
- let result = client.delete_webcapture_edit(789).wait();
+ let result = client.delete_webcapture_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -548,7 +548,7 @@ fn main() {
}
Some("GetWebcaptureEdit") => {
- let result = client.get_webcapture_edit(789).wait();
+ let result = client.get_webcapture_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -585,7 +585,7 @@ fn main() {
}
Some("DeleteWorkEdit") => {
- let result = client.delete_work_edit(789).wait();
+ let result = client.delete_work_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
@@ -597,7 +597,7 @@ fn main() {
}
Some("GetWorkEdit") => {
- let result = client.get_work_edit(789).wait();
+ let result = client.get_work_edit("edit_id_example".to_string()).wait();
println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>")));
}
diff --git a/rust/fatcat-api-spec/examples/server_lib/server.rs b/rust/fatcat-api-spec/examples/server_lib/server.rs
index ad41ff27..a9301650 100644
--- a/rust/fatcat-api-spec/examples/server_lib/server.rs
+++ b/rust/fatcat-api-spec/examples/server_lib/server.rs
@@ -69,9 +69,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_container_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
+ fn delete_container_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_container_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_container_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -87,9 +87,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_container_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetContainerEditResponse, Error = ApiError> + Send> {
+ fn get_container_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetContainerEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_container_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_container_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -200,9 +200,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_creator_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
+ fn delete_creator_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_creator_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_creator_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -218,9 +218,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_creator_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetCreatorEditResponse, Error = ApiError> + Send> {
+ fn get_creator_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetCreatorEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_creator_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_creator_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -378,9 +378,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_file_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
+ fn delete_file_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_file_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_file_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -396,9 +396,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_file_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetFileEditResponse, Error = ApiError> + Send> {
+ fn get_file_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetFileEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_file_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_file_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -505,9 +505,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_fileset_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
+ fn delete_fileset_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteFilesetEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_fileset_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_fileset_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -523,9 +523,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_fileset_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetFilesetEditResponse, Error = ApiError> + Send> {
+ fn get_fileset_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetFilesetEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_fileset_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_fileset_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -621,9 +621,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_release_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
+ fn delete_release_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_release_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_release_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -639,9 +639,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_release_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetReleaseEditResponse, Error = ApiError> + Send> {
+ fn get_release_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetReleaseEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_release_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_release_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -787,9 +787,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_webcapture_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
+ fn delete_webcapture_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWebcaptureEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_webcapture_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_webcapture_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -805,9 +805,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_webcapture_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetWebcaptureEditResponse, Error = ApiError> + Send> {
+ fn get_webcapture_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetWebcaptureEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_webcapture_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_webcapture_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -887,9 +887,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn delete_work_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
+ fn delete_work_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("delete_work_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("delete_work_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}
@@ -905,9 +905,9 @@ impl Api for Server {
Box::new(futures::failed("Generic failure".into()))
}
- fn get_work_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetWorkEditResponse, Error = ApiError> + Send> {
+ fn get_work_edit(&self, edit_id: String, context: &Context) -> Box<Future<Item = GetWorkEditResponse, Error = ApiError> + Send> {
let context = context.clone();
- println!("get_work_edit({}) - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
+ println!("get_work_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("<none>")).clone());
Box::new(futures::failed("Generic failure".into()))
}