https://github.com/erikh/gcal
Hand-Written Rust Google Calendar API
https://github.com/erikh/gcal
Last synced: 10 months ago
JSON representation
Hand-Written Rust Google Calendar API
- Host: GitHub
- URL: https://github.com/erikh/gcal
- Owner: erikh
- License: mit
- Created: 2023-08-16T10:55:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T13:55:04.000Z (over 2 years ago)
- Last Synced: 2025-08-13T08:59:15.509Z (10 months ago)
- Language: Rust
- Size: 48.8 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gcal: Another Google Calendar API library for rust-lang
I wrote this by hand because I found other clients hard to use for my use-cases. This provides an API layer into the Google Calendar API that is very minimal but also mostly complete. Types are fully represented.
## Example
```rust
use gcal::*;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let access_key = std::env::args().nth(1).expect("Provide an access key");
let now = chrono::Local::now();
let client = Client::new(access_key);
let client = EventClient::new(client);
let list = client.list(now - chrono::Duration::days(1), now).await?;
for event in &list {
eprintln!("{} {}", event.id, event.summary);
}
}
```
## Status
This library is being maintained by hand and is not generated from any API source e.g. OpenAPI, because I can't seem to find an example of Google providing that directly. As a result, calls may be incorrect in spots, especially where they are supplied for completeness and not used in [saturn](https://github.com/erikh/saturn) which is what this library was built to power.
If documentation is sparse, I am sorry, if you need explanations please feel free to put in a ticket.
I am happy to maintain the work within reason, but the goal is mostly to prop up saturn, and any major overhauls that would alter that charter would likely be rejected.
## Author
Erik Hollensbe