Closed benib closed 12 years ago
Hey I've just added my own implementation of this based on your ideas, see 51ceec5a730ce547950f2d40f6a38b5e31352a57. I experienced problems with xmlfahrplan.sbb.ch as well so I switched to xmlfahrplan.sbb.ch.
Next steps could be to higher the limit but I'd first like to get some feedback on the changes.
This is another approach to #56. Maybe both approaches have their right to exist. The query API uri has to be changed if we want to query for more connections as @dol has discoverd.
The reference gets returned in the /connections result and can then be used in a request like:
/v1/moreConnections?reference=ca.012807207.1336656571%231&forwardCount=3
or/v1/moreConnections?reference=ca.012807207.1336656571%231&backwardCount=6
where only one of forwardCount and backwardCount shall be set and a max of 6 is allowed. This returnes an array of connections and a newreference
to be used for subsequent moreConnection requests. Thefields
parameter can be set to the same as with the/v1/connections
query to limit the result.With this approach the query for more connections is only done on request by the API consumer.
i'll do the documentation if you consider merging.