toggl-track
toggl-track is a general-purpose async Rust library for the Toggl Track API v9.
The crate is intentionally library-first: it contains no CLI, TUI, local database cache, reporting layer, or app-specific configuration storage. It provides typed request/response models around commonly used Toggl Track API operations and leaves application policy to callers.
Status
Initial development. The current implementation covers the reusable Toggl API client pieces extracted from toggl-timeguru and is not yet a complete wrapper for every Toggl Track endpoint.
Install
[]
= "0.1"
Quick start
use ;
async
Time entries
use ;
use ;
async
Starting and stopping a timer
use ;
async
Implemented API surface
GET /meGET /me/time_entriesGET /me/time_entries/currentGET /me/time_entries/{time_entry_id}POST /workspaces/{workspace_id}/time_entriesPUT /workspaces/{workspace_id}/time_entries/{time_entry_id}DELETE /workspaces/{workspace_id}/time_entries/{time_entry_id}PATCH /workspaces/{workspace_id}/time_entries/{time_entry_id}/stopPATCH /workspaces/{workspace_id}/time_entries/{time_entry_ids}for bulk editsGET /workspacesGET /workspaces/{workspace_id}/projects
See docs/GAPS.md for the endpoint and feature gap review.
Design notes
- Uses
reqwestwithrustls-tls. - Authenticates with a Toggl API token via HTTP Basic auth using
api_tokenas the password. - Tracks
X-Toggl-Quota-RemainingandX-Toggl-Quota-Resets-Inheaders. - Provides a configurable base URL and retry policy for tests and callers.
- Uses a crate-specific
Errortype instead ofanyhow.
License
MIT