Crate oura_api

Source
Expand description

§Oura API Client

This crate provides a client for the Oura V2 REST API.

Note that this client does not support the Oura V1 REST API.

§Usage

use oura_api::{OuraClient, DateQuery};

// token is the personal access token for the Oura API
let token = std::env::var("OURA_PERSONAL_ACCESS_TOKEN").unwrap();
let client = OuraClient::new(&token);

let august_date_query = DateQuery::builder().start_date("2023-08-01").end_date("2023-08-31").build();
let august_daily_sleep = client.list_daily_sleep(august_date_query).unwrap();

Modules§

models
Models for the Oura API

Structs§

DateQuery
Query parameters for endpoints that accept a date range.
DatetimeQuery
Query parameters for endpoints that accept a datetime range.
ListResponse
Response from endpoints that return a list of items.
OuraClient
The Oura API client.