refactor: rename api_request to api_call

This commit is contained in:
mokurin000
2025-07-30 16:46:31 +08:00
parent d3c3592e67
commit 789a3566bf

View File

@@ -37,11 +37,7 @@ pub trait MaiVersionExt: MaiVersion {
format!("{digest:x}")
}
fn api_request<D>(
api: APIMethod,
agent_extra: impl Display,
data: D,
) -> Result<Request, ApiError>
fn api_call<D>(api: APIMethod, agent_extra: impl Display, data: D) -> Result<Request, ApiError>
where
D: Serialize,
{
@@ -73,7 +69,7 @@ pub trait MaiVersionExt: MaiVersion {
D: Serialize,
{
async {
let req = Self::api_request(api, agent_extra, data)?;
let req = Self::api_call(api, agent_extra, data)?;
let data = client.request(req).await?.bytes().await?;
let decoded = Self::decode(data)?;
Ok(decoded)