| Crates.io | google-workspace-apis |
| lib.rs | google-workspace-apis |
| version | 1.2.0 |
| created_at | 2025-07-24 12:54:25.919338+00 |
| updated_at | 2025-08-11 14:03:01.066766+00 |
| description | A Rust library for interacting with Google Workspace APIs |
| homepage | |
| repository | https://github.com/BitsAndDroids/google-workspace-apis |
| max_upload_size | |
| id | 1765999 |
| size | 226,288 |
This crate is an unofficial opinionated library that unifies the Google Workspace API clients. The current workspace crate landscape is highly fragmented, with each API employing a distinct approach. This library aims to provide a unified interface for all Google Workspace APIs.
Current supported APIs include: Google Tasks, Google Calendar, and Gmail.
// If the last parameter is set to true the client
// will automatically refresh the access token if it expires
// The access token is retrieved by the Google auth callback
// See the axum_calendar_example.rs example for a full example
let new_client = GoogleClient::new(client_credentials, access_token, true);
// Insert a task
match TasksClient::new(client)
.insert_task("{TASKLIST_ID}")
.set_task_title("test api")
.set_task_notes("hello")
.request()
.await;
//Get a list of events from the primary calendar
let events = CalendarEventsClient::new(client)
.get_events("primary")
.single_events(true)
.event_type(EventType::Birthday)
.max_results(10)
.order_by(google_workspace_apis::calendar::events::requests::EventOrderBy::StartTime)
//To avoid retrieving past events we set the time_min to now
.time_min(chrono::Utc::now())
//Since we retrieve single events add all birthdays for the next year
.time_max(chrono::Utc::now() + chrono::Duration::days(365))
.request()
.await
.unwrap();
I'm currently working on the following APIs (more will be added soon):
For the API documentation, see the Calender API documentation.
The actions that are currently supported by this crate are:
For the API documentation, see the Tasks API documentation.
The actions that are currently supported by this crate are:
For the API documentation, see the Gmail API documentation.
The actions that are currently supported by this crate are:
To include the correct API client,
you need to define the feature in your Cargo.toml file:
google-workspaces-api = { version: "1.2", features = ["calendar", "tasks", "gmail"] }