first commit
This commit is contained in:
42
README.md
Normal file
42
README.md
Normal 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
|
||||
Reference in New Issue
Block a user