use std::collections::HashMap;
use crate::{Ready, WWClientResult};
#[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: &mut crate::client::WebwareClient<impl Ready + Send>,
mut parameters: HashMap<&str, &str>,
) -> WWClientResult<Self::Response> {
parameters.insert("FELDER", Self::FIELDS);
client
.request_generic(
Self::METHOD,
Self::FUNCTION,
Self::VERSION,
parameters,
None,
)
.await
}
}