ex_tiqets v0.1.0 ExTiqets

Elixir wrapper for the Tiqets API

Link to this section Summary

Functions

Create a client to be used with each HTTP function (get, post, etc.) using default settings from config.exs or dynamically in runtime

Link to this section Functions

Link to this function

client(options \\ [])

Create a client to be used with each HTTP function (get, post, etc.) using default settings from config.exs or dynamically in runtime

Examples

iex> ExTiqets.client
%Tesla.Client{
  pre: [
    {Tesla.Middleware.BaseUrl, :call, ["https://api.tiqets.com/v2"]},
    {Tesla.Middleware.JSON, :call, [[]]},
    {Tesla.Middleware.Query, :call, [[lang: "en", currency: "GBP"]]},
    {Tesla.Middleware.Headers, :call, [[{"Authorization", "Token: API_KEY"}]]},
    {Tesla.Middleware.PathParams, :call, [[]]}
  ]}

iex> ExTiqets.client(%{api_key: "123456abcdef", language: "ru", currency: "GBP"})
%Tesla.Client{
  pre: [{Tesla.Middleware.BaseUrl, :call, ["https://api.tiqets.com/v2"]},
    {Tesla.Middleware.JSON, :call, [[]]},
    {Tesla.Middleware.Query, :call, [[lang: "ru", currency: "GBP"]]},
    {Tesla.Middleware.Headers, :call, [[{"Authorization", "Token: 123456abcdef"}]]},
    {Tesla.Middleware.PathParams, :call, [[]]}
  ]}

Returns %Tesla.Client{}