[Open-transport] Trnsprt.ch

Hannes Gassert hannes at gassert.ch
Tue Oct 23 22:36:31 UTC 2012


Pieter,

Thanks a lot for your input! I must admit I did not spend more than
half an evening to think about the URL structure, and my focus was
mostly on making sense for a not-too-technical end user - so you're
certainly right about their RESTfulness etc.

My goal was to expose a structure an end user could easily adapt and
use e.g as a link in an email (Party next Saturday in Geneva, everbody
come:http://trnsprt.ch/to/Geneva/Next%20Saturday%209pm") or to tell
their mother to take exactly that train
(http://trnsprt.ch/to/Chur/from/Bern/2012-10-25T09:02 - something
http://www.sbb.ch alas, won't help with).

I agree with you that when paging comes into play then things get less
clear, no doubt about that. But how to identify unique individual
connections and still have easy to understand URLs is not obvious yet
to me - $from+$to+$time just is not unique.

So what's OTP's solution for that?

Talk soon,
H


On Tue, Oct 23, 2012 at 11:59 PM, Pieter Colpaert
<pieter.colpaert at okfn.org> wrote:
> Hi Hannes,
>
> I think we should agree on a common URI structure for journey planners,
> departure/arrival boards and vehicle/line information. The people from
> OpenTripPlanner were doing this already (Andrew, do you mind correcting
> me please?).
>
> One problem I have with your URI structure is that to and from are
> included as part of the structure, while these are not different
> resources (in a RESTful way).
>
> A second problem I have with the URI structure is that your URIs are not
> unique for a certain output or thing. When sending a URI to someone, you
> will not be able to send him/her the information you've meant at a
> certain moment in time.
>
> At iRail we have been doing it in a slightly different way, including
> the timestamp as well. For instance:
>
> http://data.irail.be/NMBS/Departures/Gent-Sint-Pieters/2012/10/24/12/00
>
> When going to this URI, it will redirect you to a URL which will check
> the accept headers (.about) for the right formatter (xml, json, csv, ...).
>
> Kind regards,
>
> Pieter
>


-- 
Hannes Gassert  |  http://gassert.ch  |  +41 78 663 11 09




More information about the open-transport mailing list