diff --git a/docs/changelog.md b/docs/changelog.md index 00425999..0e3fe2f6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,11 @@ # 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` - 51b1e68 `throttle.js`, `retry.js`: use default profile 🐛 diff --git a/docs/writing-a-profile.md b/docs/writing-a-profile.md index fc0098c2..46aff41e 100644 --- a/docs/writing-a-profile.md +++ b/docs/writing-a-profile.md @@ -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`. - **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. - - 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. ## 3. Products diff --git a/package.json b/package.json index b873f4b9..d11f0d00 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hafas-client", "description": "Client for HAFAS public transport APIs.", - "version": "5.0.1", + "version": "5.0.2", "main": "index.js", "files": [ "index.js", @@ -17,7 +17,7 @@ "contributors": [ "Julius Tens " ], - "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", "bugs": "https://github.com/public-transport/hafas-client/issues", "license": "ISC",