From 313f6926a6608e9740924e3ff4fe6dfea2016397 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 20 Jul 2018 20:00:16 -0700 Subject: update fatcat-api lib with schema changes --- rust/fatcat-api/src/client.rs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'rust/fatcat-api/src/client.rs') diff --git a/rust/fatcat-api/src/client.rs b/rust/fatcat-api/src/client.rs index b68c43d2..b785adab 100644 --- a/rust/fatcat-api/src/client.rs +++ b/rust/fatcat-api/src/client.rs @@ -163,7 +163,7 @@ impl Client { } impl Api for Client { - fn accept_editgroup(&self, param_id: i64, context: &Context) -> Box + Send> { + fn accept_editgroup(&self, param_id: String, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/{id}/accept", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); let hyper_client = (self.hyper_client)(); @@ -1349,7 +1349,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editgroup(&self, param_id: i64, context: &Context) -> Box + Send> { + fn get_editgroup(&self, param_id: String, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/{id}", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); let hyper_client = (self.hyper_client)(); @@ -1409,12 +1409,8 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editor(&self, param_username: String, context: &Context) -> Box + Send> { - let url = format!( - "{}/v0/editor/{username}", - self.base_path, - username = utf8_percent_encode(¶m_username.to_string(), PATH_SEGMENT_ENCODE_SET) - ); + fn get_editor(&self, param_id: String, context: &Context) -> Box + Send> { + let url = format!("{}/v0/editor/{id}", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); @@ -1466,12 +1462,8 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editor_changelog(&self, param_username: String, context: &Context) -> Box + Send> { - let url = format!( - "{}/v0/editor/{username}/changelog", - self.base_path, - username = utf8_percent_encode(¶m_username.to_string(), PATH_SEGMENT_ENCODE_SET) - ); + fn get_editor_changelog(&self, param_id: String, context: &Context) -> Box + Send> { + let url = format!("{}/v0/editor/{id}/changelog", self.base_path, id = utf8_percent_encode(¶m_id.to_string(), PATH_SEGMENT_ENCODE_SET)); let hyper_client = (self.hyper_client)(); let request = hyper_client.request(hyper::method::Method::Get, &url); -- cgit v1.2.3