first commit

This commit is contained in:
2024-12-07 13:20:02 -05:00
commit 0bd5155210
6 changed files with 1923 additions and 0 deletions

42
README.md Normal file
View File

@@ -0,0 +1,42 @@
# Focusmaters
Rust client library for the Focusmate API.
## Installation
Add to your Cargo.toml:
```toml
[dependencies]
focusmaters = "0.1.0"
```
## Usage
```rust
use focusmaters::FocusmateClient;
use time::OffsetDateTime;
#[tokio::main]
async fn main() {
let client = FocusmateClient::new("your-api-key".to_string());
// Get profile
let me = client.get_me().await?;
// Get sessions for last month
let start = OffsetDateTime::now_utc() - time::Duration::days(30);
let end = OffsetDateTime::now_utc();
let sessions = client.get_sessions(&start, &end).await?;
}
```
## Features
- Profile retrieval
- User profile lookup
- Session history with auto-pagination for ranges > 1 year
- Session partner lookup
## License
MIT