Dime.Scheduler for Rust
Official Rust client for the Dime.Scheduler API. One async client, a typed accessor per entity, and the same accessor names as the .NET, JavaScript, Python and Go SDKs.
Installation
[]
= "0.1"
= { = "1", = ["macros", "rt-multi-thread"] }
Quick start
use ;
async
Accessors
Every import-shaped entity (client.categories, client.resources, client.tags, …) exposes
create, create_many, update, update_many, delete, delete_many and get_all. Write
methods take an entities::* value and return the API's response envelope; get_all returns
the matching types::*Dto list.
| Accessor | Extra methods |
|---|---|
appointments |
get(start, end, &resources), get_by_id(id) |
jobs |
get(job_no) |
tasks |
list(&TaskListOptions) |
notifications |
get(page, limit, &NotificationListOptions) |
resource_capacities, time_entries, time_sessions |
get(start, end) |
calendars, resource_types, appointment_dependencies, appointment_fields |
get_all() only |
task_budget_entries |
create, create_many, delete, delete_many only |
task_assignments |
create(&req), delete(&req) |
connectors, geocoding, imports, messages, optimization, recommendation, recurring_appointments, users |
see the rustdoc |
Dates are plain strings in the API's own format: RFC 3339 for appointments and resource
capacities, YYYY-MM-DD for time entries and sessions.
Generated types
dimescheduler::entities holds the import bodies you send, dimescheduler::types the DTOs,
request types and enums, and dimescheduler::models the server's domain read-models that
appear nested inside DTOs. All structs derive Default, so build them with
..Default::default(). They are generated from the OpenAPI spec; see
scripts/codegen.py.
Errors
Every method returns dimescheduler::Result<T>. A non-2xx response is
Error::Api { status, body } where body is already the human-readable message when the
API sent one of its known error shapes. Transport failures are Error::Http.
This crate does not retry. A 429 or 5xx is returned to you; retry at the call site
if your workload needs it.
Environments
Environment::Production (https://api.dimescheduler.com), Environment::Test,
Environment::Sandbox.
License
MIT