An Elixir client for the PTV timetable API using Finch.
Installation
The package can be installed by adding :ptv_timetable to your mix.exs
def deps do
[
{:ptv_timetable, "~> 0.1.0"}
]
endQuickstart
- You need a Developer ID and API Key, to request one
All you need to do is start PtvTimetable in a supervision tree
defmodule MyApp.Application do
use Application
def start(_type, _args) do
# . . .
children = [{PtvTimetable, api_key: ptv_api_key, user_id: ptv_devid }]
Supervisor.start_link(children, strategy: :one_for:one)
end
endThen somewhere in your application:
# . . .
PtvTimetable.request("/route", [])
# . . .License
The code in this repository is licensed under the Apache-2.0 license, you can find a copy in the local tree.