minor fix, changelog 📝, 5.0.2

This commit is contained in:
Jannis R 2020-01-15 18:17:49 +01:00
parent e049aa3d04
commit e9699f98ba
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
3 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,11 @@
# Changelog # Changelog
## `5.0.2`
- e049aa3 `parseWarning()`: fix `parseMsgEvent()` 🐛
[🏷 `5.0.2`](https://github.com/public-transport/hafas-client/releases/tag/5.0.2), 2020-01-15
## `5.0.1` ## `5.0.1`
- 51b1e68 `throttle.js`, `retry.js`: use default profile 🐛 - 51b1e68 `throttle.js`, `retry.js`: use default profile 🐛

View file

@ -87,7 +87,7 @@ You may want to start with the [profile boilerplate](profile-boilerplate.js).
- **Identify the `timezone`.** This may be tricky, a for example [Deutsche Bahn](https://en.wikipedia.org/wiki/Deutsche_Bahn) returns departures for Moscow as `+01:00` instead of `+03:00`. - **Identify the `timezone`.** This may be tricky, a for example [Deutsche Bahn](https://en.wikipedia.org/wiki/Deutsche_Bahn) returns departures for Moscow as `+01:00` instead of `+03:00`.
- **Copy the authentication** and other meta fields, namely `ver`, `ext`, `client` and `lang`. - **Copy the authentication** and other meta fields, namely `ver`, `ext`, `client` and `lang`.
- You can find these fields in the root of each request JSON. Check [a VBB request](https://gist.github.com/derhuerst/5fa86ed5aec63645e5ae37e23e555886#file-1-http-L13-L22) and [the corresponding VBB profile](https://github.com/public-transport/hafas-client/blob/6e61097687a37b60d53e767f2711466b80c5142c/p/vbb/index.js#L22-L29) for an example. - You can find these fields in the root of each request JSON. Check [a VBB request](https://gist.github.com/derhuerst/5fa86ed5aec63645e5ae37e23e555886#file-1-http-L13-L22) and [the corresponding VBB profile](https://github.com/public-transport/hafas-client/blob/6e61097687a37b60d53e767f2711466b80c5142c/p/vbb/index.js#L22-L29) for an example.
- Add a function `transformReqBody(body)` to your profile, which assigns them to `body`. - Add a function `transformReqBody(ctx, body)` to your profile, which adds the fields to `body`.
- Some profiles have a `checksum` parameter (like [here](https://gist.github.com/derhuerst/2a735268bd82a0a6779633f15dceba33#file-journey-details-1-http-L1)) or two `mic` & `mac` parameters (like [here](https://gist.github.com/derhuerst/5fa86ed5aec63645e5ae37e23e555886#file-1-http-L1)). If you see one of them in your requests, jump to the [*Authentication* section of the `mgate.exe` docs](hafas-mgate-api.md#authentication). Unfortunately, this is necessary to get the profile working. - Some profiles have a `checksum` parameter (like [here](https://gist.github.com/derhuerst/2a735268bd82a0a6779633f15dceba33#file-journey-details-1-http-L1)) or two `mic` & `mac` parameters (like [here](https://gist.github.com/derhuerst/5fa86ed5aec63645e5ae37e23e555886#file-1-http-L1)). If you see one of them in your requests, jump to the [*Authentication* section of the `mgate.exe` docs](hafas-mgate-api.md#authentication). Unfortunately, this is necessary to get the profile working.
## 3. Products ## 3. Products

View file

@ -1,7 +1,7 @@
{ {
"name": "hafas-client", "name": "hafas-client",
"description": "Client for HAFAS public transport APIs.", "description": "Client for HAFAS public transport APIs.",
"version": "5.0.1", "version": "5.0.2",
"main": "index.js", "main": "index.js",
"files": [ "files": [
"index.js", "index.js",
@ -17,7 +17,7 @@
"contributors": [ "contributors": [
"Julius Tens <mail@juliustens.eu>" "Julius Tens <mail@juliustens.eu>"
], ],
"homepage": "https://github.com/public-transport/hafas-client/tree/5.0.1", "homepage": "https://github.com/public-transport/hafas-client/tree/5.0.2",
"repository": "public-transport/hafas-client", "repository": "public-transport/hafas-client",
"bugs": "https://github.com/public-transport/hafas-client/issues", "bugs": "https://github.com/public-transport/hafas-client/issues",
"license": "ISC", "license": "ISC",