OpendataCH / Transport

Swiss public transport API
http://transport.opendata.ch/
MIT License
242 stars 50 forks source link

Arrival platform numbers are not available #172

Closed hb9tst closed 2 years ago

hb9tst commented 7 years ago

When looking up a journey, arrival platform numbers are never available on the beta API, whereas departure platforms are. On the "normal" API, both are available all the time. This information is not critical, but is sometimes very useful (e.g. to estimate if a connection is doable with a lot of luggage to transport...).

For example, http://transport.opendata.ch/v1/connections?from=Pully&to=Lutry&time=10:00 returns (cutting out of course all the irrelevant fields):

{
  "connections": [
    {
      "sections": [
        {
          "departure": {
            "platform": "2",
          },
          "arrival": {
            "platform": "2",
          },

Whereas the same query on the beta version gives:

{
  "connections": [
    {
      "sections": [
        {
          "departure": {
            "platform": "2",
          },
          "arrival": {
            "platform": null,
          },

It looks like the information is not available on timetable.search.ch either...

helbling commented 7 years ago

I added the arrival tracks to the timetable.search.ch API

hb9tst commented 7 years ago

Looks like the problem is solved then, the information appears also on transport.opendata.ch... thanks!

simon-isler commented 3 years ago

@fabian any update on this? The arrival platforms still don't seem to work properly.

The following request gives me the correct departure platforms, but incorrect arrival platforms. https://transport.opendata.ch/v1/connections?to=Zurich&from=Schaffhausen

Response ```json { "connections": [ { "from": { "platform": "5" }, "to": { "platform": "5" } }, { "from": { "platform": "3" }, "to": { "platform": "3" } }, { "from": { "platform": "5" }, "to": { "platform": "5" } }, { "from": { "platform": "3" }, "to": { "platform": "3" } } ] } ```
fabian commented 2 years ago

@simon-isler Thanks for the report. I looked into this and I think I found a fix - are you able to confirm it's working now?

simon-isler commented 2 years ago

@fabian thanks for looking into it! The request I mentioned in https://github.com/OpendataCH/Transport/issues/172#issuecomment-927316663 works now 👍🏼