Client library for the MBTA V3 API.
The package can be installed by adding mbta_v3_api
to your list of dependencies in mix.exs
:
def deps do
[
{:mbta_v3_api, "~> 0.0.1"}
]
end
In your runtime configuration (config/runtime.exs
) provide the API URL, key, and version (all required).
config :v3_api,
base_url: "API_URL",
api_key: "API_KEY",
api_version: "2021-01-09"
You can also set the following optional confuration values.
:cache_size
- Number of items to retain in the cache (default:10_000
):populate_caches?
- Whether to pre-populate route data in the cache (default:false
)
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mbta_v3_api.