-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMTA: Austin, Texas metro area public transit #58
Conversation
p/cmta/index.js
Outdated
const _parseLocation = require('../../parse/location') | ||
const _createParseJourney = require('../../parse/journey') | ||
const _createParseDeparture = require('../../parse/departure') | ||
const _formatStation = require('../../format/station') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these 5 unused require
s above.
Thanks for your contribution. This looks very good so far! We should have made it more visible that the |
p/cmta/index.js
Outdated
rail: true | ||
} | ||
|
||
const formatBitmask = createFormatBitmask(modes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line ist duplicated at line 13
.
p/cmta/example.js
Outdated
// client.departures('000002370', {duration: 1}) | ||
// client.locations('Westgate', {results: 2}) | ||
// client.location('000005534') // Downtown light rail station | ||
// client.nearby(30.266222, -97.746058, {distance: 60}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be an object. Check the docs for nearby()
.
p/cmta/index.js
Outdated
transformReqBody, | ||
formatProducts, | ||
parseProducts: createParseBitmask(modes.allProducts, defaultProducts), | ||
radar: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The journey leg/trip ID feature is supported by the endpoint, so please add journeyLeg: true
here. This will make the client.journeyLeg()
method available.
Thanks for your feedback @derhuerst ! |
If you want to, tests are very welcome. I'm rewriting the test architecture though, so i'd add them later anyways. |
Please also add an entry to |
We've merged the tests PR (#57) into @nickturskyi Do you want to write tests or should I do it? |
@derhuerst I'm going to add tests if that's not something you already started working on. |
Didn't start yet. |
Started working on it. Adapted your code to the latest version of Closing in favor of #79. |
Turns out, HAFAS is used not only by the European customers! :)
I'm not 100% confident in this code, as all this is discovered by exploratory testing of the official app & other profiles in
hafas-client
, but it works! Feedback is welcome of course.