README.md
# ThinkificAdminAPI
Thinkific's public API can be used to integrate your application with your Thinkific site.
## Installation
This package can be installed by adding `thinkific_admin_api` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:thinkific_admin_api, "~> 0.1.0"}]
end
```
The docs can be found at [Thinkific Admin API Hex Docs](https://hexdocs.pm/thinkific_admin_api/readme.html).
## How to use it
### Connection
* You can either use token based:
```elixir
conn = ThinkificAdminAPI.Connection.new("my-subdomain", %{"Authorization" => "Bearer 1360ddc6-4029-47ec-a027-e5f1e60f4c38"})
```
* Either API Key authorization:
```elixir
conn = ThinkificAdminAPI.Connection.new("my-subdomain", %{"X-Auth-API-Key" => "9icu13c55130879ef301b1975a21f27c"})
```
### Fetching data example
In order to get a list of courses:
```elixir
# In order to define conn, check the Connection section above
ThinkificAdminAPI.Api.Courses.get_courses(conn)
```