ExTiqets

Elixir wrapper for the Tiqets V2 API

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

If available in Hex, the package can be installed by adding ex_tiqets to your list of dependencies in mix.exs:

def deps do
[
{:ex_tiqets, "~> 0.1.0"}
]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_tiqets.