maester

An API of Ice and Fire client for Elixir

Build Status

Install

In your mix.exs:

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

Then run mix deps.get.

Usage

Check out the fancy Hexdocs here.

You got three modules under Maester: Book, Character, House, and Request. The first three allow you get the respective resources with a by_id and all functions. all takes it optional filters. See the API documentation for possible filters and pass them in as a map.

Request exposes a make function that allows you to write any query and a filter map. The other modules use it under the hood.

In case of an error, you will get an {:error, message} tuple.

Examples

Getting all characters who are female:

Maester.Character.all(%{:gender => "female"})

Getting a house by id:

Maester.House.by_id(378)

You get the idea.

License

MIT © Juan Soto