pub async fn list_calendar_events(&self, calendar_id: &str, show_deleted: bool) -> Result<Vec<CalendarEvent>, APIError> {
        // Build the request.
        let request = self.request(
            CALENDAR_ENDPOINT,
            Method::GET,
            &format!("calendars/{}/events", calendar_id),
            (),
            Some(&[("singleEvents", "true"), ("maxResults", "2500"), ("showDeleted", &show_deleted.to_string())]),
        );

        let resp = self.client.execute(request).await.unwrap();
        match resp.status() {
            StatusCode::OK => (),
            s => {
                return Err(APIError {
                    status_code: s,
                    body: resp.text().await.unwrap(),
                });
            }
        };

        // Try to deserialize the response.
        let value: CalendarEvents = resp.json().await.unwrap();

        Ok(value.items)
    }
/// List events on a calendar.
List events on a calendar.
List events on a calendar .
pub async fn list_calendar_events(&self, calendar_id: &str, show_deleted: bool) -> Result<Vec<CalendarEvent>, APIError> {
        // Build the request.
        let request = self.request(
            CALENDAR_ENDPOINT,
            Method::GET,
            &format!("calendars/{}/events", calendar_id),
            (),
            Some(&[("singleEvents", "true"), ("maxResults", "2500"), ("showDeleted", &show_deleted.to_string())]),
        );
        let resp = self.client.execute(request).await.unwrap();
        match resp.status() {
            StatusCode::OK => (),
            s => {
                return Err(APIError {
                    status_code: s,
                    body: resp.text().await.unwrap(),
                });
            }
        };
        // Try to deserialize the response.
        let value: CalendarEvents = resp.json().await.unwrap();
        Ok(value.items)
    }
pub async fn list_calendar_events ( & self , calendar_id : & str , show_deleted : bool ) -> Result < Vec < CalendarEvent > , APIError > { // Build the request. let request = self . request ( CALENDAR_ENDPOINT , Method :: GET , & format ! ( " " calendar_id ) , ( ) , Some ( & [ ( " " , " " ) , ( " " , " " ) , ( " " , & show_deleted . to_string ( ) ) ] ) , ) ; let resp = self . client . execute ( request ) . await . unwrap ( ) ; match resp . status ( ) { StatusCode :: OK => ( ) , s => { return Err ( APIError { status_code : s , body : resp . text ( ) . await . unwrap ( ) , } ) ; } } ; // Try to deserialize the response. let value : CalendarEvents = resp . json ( ) . await . unwrap ( ) ; Ok ( value . items ) }
List events on a calendar.
List events on a calendar .
&self
calendar_id
&str
show_deleted
bool
&self
calendar_id
&str
show_deleted
bool