db-vendo-client/p/readme.md

18 lines
724 B
Markdown
Raw Normal View History

2018-01-04 22:37:47 +01:00
# Profiles
2018-06-29 15:05:29 +02:00
This directory contains specific customisations for each endpoint, called *profiles*. They **parse data from the API differently, add additional information, or enable non-default methods** (such as [`trip`](../docs/trip.md)) if they are supported.
2018-01-04 22:37:47 +01:00
Each profile has it's own directory. It will be passed into `hafas-client` and is expected to be in a certain structure:
```js
const createClient = require('hafas-client')
const someProfile = require('hafas-client/p/some-profile')
// create a client with the profile
const client = createClient(dbProfile)
// use it to query data…
```
2020-03-18 21:32:05 +01:00
If you want to write a profile for an endpoint, check out the [*writing a profile* guide](../docs/writing-a-profile.md).