More improvements and testing.

This commit is contained in:
Mauro D
2022-05-14 17:24:26 +00:00
parent e24039ab12
commit a1be8c4ad5
31 changed files with 728 additions and 396 deletions

View File

@@ -0,0 +1,39 @@
use crate::{
core::{
get::GetRequest,
request::{Arguments, Request},
response::{VacationResponseGetResponse, VacationResponseSetResponse},
set::SetRequest,
},
Method, Set, URI,
};
use super::VacationResponse;
impl Request<'_> {
pub fn get_vacation_response(&mut self) -> &mut GetRequest<super::Property, ()> {
self.add_capability(URI::VacationResponse);
self.add_method_call(
Method::GetVacationResponse,
Arguments::vacation_response_get(self.params(Method::GetVacationResponse)),
)
.vacation_response_get_mut()
}
pub async fn send_get_vacation_response(self) -> crate::Result<VacationResponseGetResponse> {
self.send_single().await
}
pub fn set_vacation_response(&mut self) -> &mut SetRequest<VacationResponse<Set>, ()> {
self.add_capability(URI::VacationResponse);
self.add_method_call(
Method::SetVacationResponse,
Arguments::vacation_response_set(self.params(Method::GetVacationResponse)),
)
.vacation_response_set_mut()
}
pub async fn send_set_vacation_response(self) -> crate::Result<VacationResponseSetResponse> {
self.send_single().await
}
}

View File

@@ -1,4 +1,5 @@
pub mod get;
pub mod helpers;
pub mod set;
use std::fmt::Display;