From cda96b669888f07d27f97ad0a64a8848c50dc829 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 18 Mar 2020 21:32:05 +0100 Subject: [PATCH] improve docs :memo: [ci skip] --- .github/funding.yml | 4 ++-- docs/hafas-mgate-api.md | 1 + docs/writing-a-profile.md | 7 +++---- p/readme.md | 2 ++ p/vbb/example.js | 2 +- readme.md | 4 ++++ 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/funding.yml b/.github/funding.yml index 717fd386..44e5f557 100644 --- a/.github/funding.yml +++ b/.github/funding.yml @@ -1,2 +1,2 @@ -patreon: https://www.patreon.com/derhuerst -github: derhuerst \ No newline at end of file +patreon: derhuerst +github: derhuerst diff --git a/docs/hafas-mgate-api.md b/docs/hafas-mgate-api.md index 5c5f641f..0fd82526 100644 --- a/docs/hafas-mgate-api.md +++ b/docs/hafas-mgate-api.md @@ -157,3 +157,4 @@ todo: generic server error - [@Nakaner's `strecken.info` API docs](https://github.com/Nakaner/bahnstoerungen/tree/62a72b1e0f0255668500b438187ff65aef39242a/api-doc/db-strecken-info) - [unfinished HAFAS glossary](https://gist.github.com/derhuerst/74b703e2a0fc64e4a0fa8fbb1f3a61b4) +- [various `mgate.exe` HTTP traffic recordings](https://gist.github.com/search?q=post+mgate.exe&ref=searchresults) diff --git a/docs/writing-a-profile.md b/docs/writing-a-profile.md index 46aff41e..fcc0e253 100644 --- a/docs/writing-a-profile.md +++ b/docs/writing-a-profile.md @@ -147,12 +147,11 @@ all but product F 30 11110 31 - 2^0 2^0 ## 4. Additional info We consider these improvements to be *optional*: - -- **Check if the endpoint supports the trips call.** - - In the app, check if you can query details for the status of a single journey leg. It should load realtime delays and the current progress. +- **Check if the endpoint supports the `trip()` call.** + - In the app, check if you can re-fetch details for the status of a single journey leg. It should load realtime delays and the current progress. - If this feature is supported, add `trip: true` to the profile. - **Check if the endpoint supports the live map call.** Does the app have a "live map" showing all vehicles within an area? If so, add `radar: true` to the profile. -- **Consider transforming station & line names** into the formats that's most suitable for *local users*. Some examples: +- **Consider transforming station & line names** into the formats that's most suitable for *local users*. This is just an optimal optimisation that makes it easier for users of the profile to use the data. Some examples: - `M13 (Tram)` -> `M13`. With Berlin context, it is obvious that `M13` is a tram. - `Berlin Jungfernheide Bhf` -> `Berlin Jungfernheide`. With local context, it's obvious that *Jungfernheide* is a train station. - **Check if the endpoint has non-obvious limitations** and let use know about these. Examples: diff --git a/p/readme.md b/p/readme.md index 7cb66714..fa6630a9 100644 --- a/p/readme.md +++ b/p/readme.md @@ -13,3 +13,5 @@ const client = createClient(dbProfile) // use it to query data… ``` + +If you want to write a profile for an endpoint, check out the [*writing a profile* guide](../docs/writing-a-profile.md). diff --git a/p/vbb/example.js b/p/vbb/example.js index aea90045..c2e66a5e 100644 --- a/p/vbb/example.js +++ b/p/vbb/example.js @@ -9,7 +9,7 @@ const client = createClient(vbbProfile, 'hafas-client-example') // client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.departures('900000013102', {duration: 1}) // client.arrivals('900000013102', {duration: 10, linesOfStops: true}) -client.locations('txl A', {results: 2}) +client.locations('hansaplatz', {results: 2}) // client.stop('900000042101', {linesOfStops: true}) // Spichernstr // client.nearby({ // type: 'location', diff --git a/readme.md b/readme.md index 635d3c5b..bcc6d8e7 100644 --- a/readme.md +++ b/readme.md @@ -236,6 +236,7 @@ HAFAS endpoint | library ## Related - [`public-transport-enabler`](https://github.com/schildbach/public-transport-enabler) – Unleash public transport data in your Java project. +- [`TripKit`](https://github.com/alexander-albers/tripkit) – Swift library for querying data from public transport providers. - [*Friendly Public Transport Format*](https://github.com/public-transport/friendly-public-transport-format#friendly-public-transport-format-fptf) – A format for APIs, libraries and datasets containing and working with public transport data. - [`db-hafas`](https://github.com/derhuerst/db-hafas#db-hafas) – JavaScript client for the DB HAFAS API. - [`vbb-hafas`](https://github.com/derhuerst/vbb-hafas#vbb-hafas) – JavaScript client for Berlin & Brandenburg public transport HAFAS API. @@ -246,6 +247,7 @@ HAFAS endpoint | library - [`hafas-rest-api`](https://github.com/derhuerst/hafas-rest-api#hafas-rest-api) – Expose a HAFAS client via an HTTP REST API. - [List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.](https://github.com/public-transport/european-transport-operators) - [Collection of european transport JavaScript modules.](https://github.com/public-transport/european-transport-modules) +- [`hafas-find-stations`](https://github.com/derhuerst/hafas-find-stations#hafas-find-stations) – Given a HAFAS client, find all stations in a bounding box. - [`hafas-collect-departures-at`](https://github.com/derhuerst/hafas-collect-departures-at#hafas-collect-departures-at) – Utility to collect departures, using any HAFAS client. - [`hafas-monitor-trips`](https://github.com/derhuerst/hafas-monitor-trips#hafas-monitor-trips) – Using a HAFAS client, watch all trips in a bounding box. - [`hafas-monitor-departures`](https://github.com/derhuerst/hafas-monitor-departures#hafas-monitor-departures) – Pass in a HAFAS client, fetch all departures at any set of stations. @@ -258,3 +260,5 @@ HAFAS endpoint | library ## Contributing If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/public-transport/hafas-client/issues). + +This project needs help! Check the [list of "help wanted" Issues](https://github.com/public-transport/hafas-client/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).