anilixir

Elixir Anilist client

Build Status

Install

In your mix.exs:

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

Then run mix deps.get.

Usage

Check out the fancy Hexdocs here.

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:

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

Or by calling Anilixir.config!:

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:

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. Remember, though, only GET requests are supported.

License

MIT © Juan Soto