ExTiqets
Elixir wrapper for the Tiqets V2 API
Documentation can be found at https://hexdocs.pm/ex_tiqets.
Usage
Create a client to make HTTP calls (based on Tesla HTTP Client)
iex> client = ExTiqets.client(%{api_key: TIQETS_API_KEY})
# => %Tesla.Client{}
Retrieve activities in NYC for Kids (id: 400)
iex> options = %{
city_id: 260932,
tag_id: 400,
page_size: 20
}
iex> ExTiqets.Product.get_by_search_filter(client, options)
{:ok, response}
response.status # => 200
response.body # => %{"pagination" => ..., "products" => [ ... ], ...}
response.headers # => [{"content-type", "application/json" ...}]
Configuration
The Tiqets API_KEY
, default language and currency can be set in the config.exs
file.
Installation
The package is available in Hex and can be installed by adding ex_tiqets
to your
list of dependencies in mix.exs
:
def deps do
[
{:ex_tiqets, "~> 0.1.0"}
]
end