diff options
Diffstat (limited to 'rust/fatcat-api/examples')
-rw-r--r-- | rust/fatcat-api/examples/client.rs | 11 | ||||
-rw-r--r-- | rust/fatcat-api/examples/server_lib/server.rs | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/rust/fatcat-api/examples/client.rs b/rust/fatcat-api/examples/client.rs index 3302c0cd..b2edead6 100644 --- a/rust/fatcat-api/examples/client.rs +++ b/rust/fatcat-api/examples/client.rs @@ -29,7 +29,6 @@ fn main() { "CreatorLookupGet", "EditgroupIdAcceptPost", "EditgroupIdGet", - "EditgroupPost", "EditorUsernameChangelogGet", "EditorUsernameGet", "FileIdGet", @@ -105,11 +104,11 @@ fn main() { println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); } - Some("EditgroupPost") => { - let result = client.editgroup_post().wait(); - println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); - } - + // Disabled because there's no example. + // Some("EditgroupPost") => { + // let result = client.editgroup_post(???).wait(); + // println!("{:?} (X-Span-ID: {:?})", result, client.context().x_span_id.clone().unwrap_or(String::from("<none>"))); + // }, Some("EditorUsernameChangelogGet") => { let result = client.editor_username_changelog_get("username_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/examples/server_lib/server.rs b/rust/fatcat-api/examples/server_lib/server.rs index 42b6384f..b81af0f8 100644 --- a/rust/fatcat-api/examples/server_lib/server.rs +++ b/rust/fatcat-api/examples/server_lib/server.rs @@ -66,9 +66,9 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn editgroup_post(&self, context: &Context) -> Box<Future<Item = EditgroupPostResponse, Error = ApiError> + Send> { + fn editgroup_post(&self, body: models::Editgroup, context: &Context) -> Box<Future<Item = EditgroupPostResponse, Error = ApiError> + Send> { let context = context.clone(); - println!("editgroup_post() - X-Span-ID: {:?}", context.x_span_id.unwrap_or(String::from("<none>")).clone()); + println!("editgroup_post({:?}) - X-Span-ID: {:?}", body, context.x_span_id.unwrap_or(String::from("<none>")).clone()); Box::new(futures::failed("Generic failure".into())) } |