Remove all code comments
This commit is contained in:
parent
b430866dbf
commit
2d764af8d7
2 changed files with 18 additions and 18 deletions
|
|
@ -44,8 +44,8 @@ impl BotServerClient {
|
||||||
&self.base_url
|
&self.base_url
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn get<T: DeserializeOwned>(&self, endpoint: &str) -> Result<T, BotError> {
|
pub async fn get<T: DeserializeOwned>(&self, endpoint: &str) -> Result<T, BotError> {
|
||||||
let url = format!("{}{endpoint}", self.base_url);
|
let url = format!("{}{endpoint}", self.base_url);
|
||||||
debug!("GET {url}");
|
debug!("GET {url}");
|
||||||
|
|
@ -54,8 +54,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn post<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
pub async fn post<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
||||||
&self,
|
&self,
|
||||||
endpoint: &str,
|
endpoint: &str,
|
||||||
|
|
@ -68,8 +68,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn put<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
pub async fn put<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
||||||
&self,
|
&self,
|
||||||
endpoint: &str,
|
endpoint: &str,
|
||||||
|
|
@ -82,8 +82,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn patch<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
pub async fn patch<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
||||||
&self,
|
&self,
|
||||||
endpoint: &str,
|
endpoint: &str,
|
||||||
|
|
@ -96,8 +96,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn delete<T: DeserializeOwned>(&self, endpoint: &str) -> Result<T, BotError> {
|
pub async fn delete<T: DeserializeOwned>(&self, endpoint: &str) -> Result<T, BotError> {
|
||||||
let url = format!("{}{endpoint}", self.base_url);
|
let url = format!("{}{endpoint}", self.base_url);
|
||||||
debug!("DELETE {url}");
|
debug!("DELETE {url}");
|
||||||
|
|
@ -106,8 +106,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn get_authorized<T: DeserializeOwned>(
|
pub async fn get_authorized<T: DeserializeOwned>(
|
||||||
&self,
|
&self,
|
||||||
endpoint: &str,
|
endpoint: &str,
|
||||||
|
|
@ -120,8 +120,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn post_authorized<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
pub async fn post_authorized<T: Serialize + Send + Sync, R: DeserializeOwned>(
|
||||||
&self,
|
&self,
|
||||||
endpoint: &str,
|
endpoint: &str,
|
||||||
|
|
@ -141,8 +141,8 @@ impl BotServerClient {
|
||||||
self.handle_response(response).await
|
self.handle_response(response).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `BotError` if the HTTP request fails or response parsing fails.
|
|
||||||
pub async fn delete_authorized<T: DeserializeOwned>(
|
pub async fn delete_authorized<T: DeserializeOwned>(
|
||||||
&self,
|
&self,
|
||||||
endpoint: &str,
|
endpoint: &str,
|
||||||
|
|
|
||||||
|
|
@ -197,8 +197,8 @@ impl VersionRegistry {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
/// Returns `serde_json::Error` if serialization fails.
|
|
||||||
pub fn to_json(&self) -> Result<String, serde_json::Error> {
|
pub fn to_json(&self) -> Result<String, serde_json::Error> {
|
||||||
serde_json::to_string_pretty(self)
|
serde_json::to_string_pretty(self)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue