ExOura

Hex.pm Build Status Coverage Status

An Elixir client for the Oura API, leveraging the OpenAPI v1.23 specification.

An Elixir library for interacting with the Oura API with a base client generated using OpenAPI Code Generator from Oura OpenAPI specs v1.23. It supports basic functionality for tertrieving data from Oura, such as activity, readiness, and sleep metrics.

Features

Installation

Add ex_oura to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_oura, "~> 0.9.0"}
  ]
end

Usage

Currently, the client support only a basic authorization and you should obtain an access token here.

Using configuration via config.exs:

config :ex_oura,
  access_token: "<YOUR_PERSONAL_ACCESS_TOKEN>"

Inline configuration:

acces_token = "<YOUR_PERSONAL_ACCESS_TOKEN>"
ExOura.Client.start_link(access_token)

Once configured, you can fetch data from Oura as follows:

{:ok, client} = ExOura.Client.start_link("<YOUR_PERSONAL_ACCESS_TOKEN>")

# Example: Fetch daily activity data
{:ok, activity_data} = client.fetch_activity_data()
IO.inspect(activity_data)

Oura OpenAPI issues

A few issues in the Oura spec that I came across during the implementation:

License

This project is licensed under the MIT License.