gcal-fetcher 0.1.0

Fetch events from the Google Calendar JSON API looking a given number of days ahead.
Documentation
use serde::Deserialize;

/// Response from Google Calendar events.list API
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EventsListResponse {
    pub(crate) items: Option<Vec<ApiEvent>>,
    pub(crate) next_page_token: Option<String>,
}

#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ApiEvent {
    pub id: Option<String>,
    pub etag: Option<String>,
    pub summary: Option<String>,
    pub start: Option<EventDateTime>,
    pub end: Option<EventDateTime>,
    pub description: Option<String>,
    pub location: Option<String>,
    pub status: Option<String>,
}

#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EventDateTime {
    pub date_time: Option<String>,
    pub date: Option<String>,
}