handle ConResCtxt to allow moreConnection query #68

Closed
wants to merge 27 commits into
from

2 participants

@benib

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 new reference to be used for subsequent moreConnection requests.
The fields 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.

@benib benib closed this Jun 3, 2012
@benib benib reopened this Jun 3, 2012
@fabian
opendata.ch member

Hey I've just added my own implementation of this based on your ideas, see 51ceec5. 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.

@fabian fabian closed this Jul 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment