Polarex: Polar.sh Elixir Client

Hex.pmDocumentation


This library uses the Elixir OpenAPI Code Generator to turn the Polar.sh OpenAPI spec into an ergonomic client.

Installation

This library is available on Hex.pm. Add the dependency in mix.exs:

def deps do
  [
    {:polarex, "~> 0.2.0"}
  ]
end

Then install the dependency using mix deps.get.

Configuration

This library will need the Polar.sh API base URL and your access token to work.

config :polarex,
  server: "https://sandbox-api.polar.sh", # or "https://api.polar.sh" for production
  access_token: "your_access_token"

Usage

All of the client operations are generated based on the OpenAPI description provided by Polar.sh. In general, you can expect to find:

Polarex.Resource.operation(...)

Where:

So to list all checkouts, you would use:

Polarex.Checkouts.checkouts_list([])

Contributing

Because this library uses a code generator for the majority of its mass, there are two modes of contribution. Please consider these when creating issues or opening pull requests: