readme.md

# anilixir

> Elixir [Anilist](http://anilist.co/) client

[![Build Status](https://travis-ci.org/sotojuan/anilixir.svg?branch=master)](https://travis-ci.org/sotojuan/anilixir)

## Install

In your `mix.exs`:

```elixir
defp deps do
  [
    { :anilixir, "~> 1.0.0" }
  ]
end
```

Then run `mix deps.get`.

## Usage

Check out the fancy Hexdocs [here](https://hexdocs.pm/anilixir/).

First of all, you need to provide an `id` and `secret` for Anilixir to use. You can do this in two ways:

In your `config/config.exs`:

```elixir
config :anilixir, id: "my_id"
config :anilixir, secret: "my_secret"
```

Or by calling `Anilixir.config!`:

```elixir
Anilixir.config!("my_id", "my_secret")
```

Now we're good to go. All you need is one function, `Anilixir.get`, which takes an Anilist API query:

```elixir
Anilixir.get("user/1")
# -> {:ok, %{"about" => "Admin of this site...}}
```

Anilixir will do all the authentication for you, even when your token expires.

Don't know what you can query? Check out the [Anilist docs](https://anilist-api.readthedocs.org/en/latest/). Remember, though, only `GET` requests are supported.

## License

MIT © [Juan Soto](http://juansoto.me)