use crate::{Ready, WWClientResult, params::Parameters};
#[cfg(feature = "derive")]
#[wwsvc_rs::async_trait]
pub trait WWSVCGetData {
const FUNCTION: &'static str;
const VERSION: u32 = 1;
const METHOD: reqwest::Method = reqwest::Method::PUT;
const FIELDS: &'static str = "";
type Response: serde::de::DeserializeOwned;
type Container: serde::de::DeserializeOwned;
async fn get(
client: &crate::client::WebwareClient<impl Ready + Send>,
mut parameters: Parameters,
) -> WWClientResult<Self::Response> {
parameters = parameters.param("FELDER", Self::FIELDS);
client
.request_generic(
Self::METHOD,
Self::FUNCTION,
Self::VERSION,
parameters,
None,
)
.await
}
}