pgrimaud / horaires-ratp-api

Webservice pour les horaires et trafic RATP en temps réel
https://api-ratp.pierre-grimaud.fr/v4
MIT License
269 stars 30 forks source link

Api V3 #54

Closed sakkhho closed 6 years ago

sakkhho commented 7 years ago

Hi

Change from V2 to V3 is now we must use HTTPS request instead of HTTP ?

ciao

pgrimaud commented 7 years ago

Hi,

HTTP is no longer supported on v3.

sakkhho commented 7 years ago

Hi regarding Destination in the V3. it is not possible now to identify the destination when the line have multiple destinations ie. RER A, @ la defense can go in multiple direction -

https://api-ratp.pierre-grimaud.fr/v3/schedules/rers/a/grande+arche+la+defense/A now we can get only "destination": "St-Germain-en-Laye. Poissy. Cergy."

would like to know if it is St Germain or Poissy/Cergy (was OK with the V2)

feasible ?

pgrimaud commented 6 years ago

@sakkhho

Hi, I just deploy a fix about it :

GET https://api-ratp.pierre-grimaud.fr/v3/schedules/rers/a/grande+arche+la+defense/A

Will now return :

{  
   "result":{  
      "schedules":[  
         {  
            "code":"TROC",
            "message":"Train à quai V.2",
            "destination":"Poissy"
         },
         {  
            "code":"UDON",
            "message":"16:00 Voie 2",
            "destination":"Cergy-Le-Haut"
         },
         {  
            "code":"ZEUS",
            "message":"16:03 Voie 2",
            "destination":"Saint-Germain-en-Laye"
         },
         {  
            "code":"TROC",
            "message":"16:05 Voie 2",
            "destination":"Poissy"
         },
         {  
            "code":"URUS",
            "message":"16:08 Voie 2",
            "destination":"Cergy-Le-Haut"
         },
         {  
            "code":"ZEUS",
            "message":"16:11 Voie 2",
            "destination":"Saint-Germain-en-Laye"
         }
      ]
   },
   "_metadata":{  
      "call":"GET /schedules/rers/a/grande+arche+la+defense/A",
      "date":"2017-10-11T15:52:44+02:00",
      "version":3
   }
}