pub struct IamRespondingAPI<C> { /* private fields */ }
Expand description
Main struct for interacting with the IAmResponding API.
Implementations§
Source§impl<C> IamRespondingAPI<C>
impl<C> IamRespondingAPI<C>
pub fn new(client: C) -> Self
Sourcepub async fn login(
&mut self,
agency: &str,
user: &str,
pass: &str,
) -> Result<(), ApiError>
pub async fn login( &mut self, agency: &str, user: &str, pass: &str, ) -> Result<(), ApiError>
Logs in to the IAmResponding API and stores token and member_id for future requests.
Sourcepub async fn get_now_responding(&self) -> Result<Vec<NowResponding>, ApiError>
pub async fn get_now_responding(&self) -> Result<Vec<NowResponding>, ApiError>
Fetches the currently responding members.
Sourcepub async fn get_on_schedule(&self) -> Result<Vec<OnSchedule>, ApiError>
pub async fn get_on_schedule(&self) -> Result<Vec<OnSchedule>, ApiError>
Fetches scheduled members.
Sourcepub async fn list_dispatch_messages(
&self,
) -> Result<Vec<DispatchMessage>, ApiError>
pub async fn list_dispatch_messages( &self, ) -> Result<Vec<DispatchMessage>, ApiError>
Fetches dispatch messages.
Sourcepub async fn get_incident_info(
&self,
incident_id: i64,
) -> Result<IncidentInfoData, ApiError>
pub async fn get_incident_info( &self, incident_id: i64, ) -> Result<IncidentInfoData, ApiError>
Fetches specific incident information.
pub async fn get_latest_incidents( &self, ) -> Result<Vec<IncidentInfoData>, ApiError>
Sourcepub async fn get_reminders_by_member(
&self,
) -> Result<Vec<EventReminder>, ApiError>
pub async fn get_reminders_by_member( &self, ) -> Result<Vec<EventReminder>, ApiError>
Fetches reminders for scheduled events or meetings for a specific member.
Auto Trait Implementations§
impl<C> Freeze for IamRespondingAPI<C>where
C: Freeze,
impl<C> RefUnwindSafe for IamRespondingAPI<C>where
C: RefUnwindSafe,
impl<C> Send for IamRespondingAPI<C>where
C: Send,
impl<C> Sync for IamRespondingAPI<C>where
C: Sync,
impl<C> Unpin for IamRespondingAPI<C>where
C: Unpin,
impl<C> UnwindSafe for IamRespondingAPI<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more