use crate::{HttpClient, HttpError};
pub async fn list_functions(
client: &HttpClient,
params: super::request::ListFunctionsRequest,
) -> Result<super::response::ListFunctionResponse, HttpError> {
client
.send_unary(reqwest::Method::POST, "functions/list", Some(params))
.await
}
pub async fn get_function(
client: &HttpClient,
params: super::request::GetFunctionRequest,
) -> Result<super::response::GetFunctionResponse, HttpError> {
client
.send_unary(reqwest::Method::POST, "functions", Some(params))
.await
}
pub async fn get_function_usage(
client: &HttpClient,
params: super::request::GetFunctionRequest,
) -> Result<super::response::UsageFunctionResponse, HttpError> {
client
.send_unary(reqwest::Method::POST, "functions/usage", Some(params))
.await
}
pub async fn list_function_profile_pairs(
client: &HttpClient,
params: super::request::ListFunctionProfilePairsRequest,
) -> Result<super::response::ListFunctionProfilePairResponse, HttpError> {
client
.send_unary(reqwest::Method::POST, "functions/profiles/pairs/list", Some(params))
.await
}
pub async fn get_function_profile_pair_usage(
client: &HttpClient,
params: super::request::GetFunctionProfilePairUsageRequest,
) -> Result<super::response::UsageFunctionProfilePairResponse, HttpError> {
client
.send_unary(reqwest::Method::POST, "functions/profiles/pairs/usage", Some(params))
.await
}