pgrimaud / ratp-api-rest

This project turnkey is distributed as a middleware to expose RATP realtime data as REST resources
MIT License
85 stars 15 forks source link

In v4, stations names became inconsistent or contain typos #27

Closed ChadiEM closed 5 years ago

ChadiEM commented 5 years ago

I know this is a v4 and it is supposed to make breaking changes compared to v3, but I have noticed strange things in v4 and wonder if those are expected or not.

Taking the bus stop 'Versailles - Chardon Lagache' as an example, traversed by buses 22, 42, 72, and PC.

Bus 22

https://api-ratp.pierre-grimaud.fr/v3/stations/bus/22

            {
                "slug": "versailles+++chardon+lagache",
                "name": "Versailles - Chardon Lagache"
            },

https://api-ratp.pierre-grimaud.fr/v4/stations/buses/22

            {
                "name": "Versailles-Chardon-Lagache",
                "slug": "versailles+chardon+lagache"
            },

Bus 72

https://api-ratp.pierre-grimaud.fr/v3/stations/bus/72

            {
                "slug": "versailles+++chardon+lagache",
                "name": "Versailles - Chardon Lagache"
            },

https://api-ratp.pierre-grimaud.fr/v4/stations/buses/72

            {
                "name": "Versailles-Chardon Lagach",
                "slug": "versailles+chardon+lagach"
            },

(Notice the typo)

Bus PC

https://api-ratp.pierre-grimaud.fr/v3/stations/bus/PC

            {
                "slug": "versailles+++chardon+lagache",
                "name": "Versailles - Chardon Lagache"
            },

https://api-ratp.pierre-grimaud.fr/v4/stations/buses/PC

            {
                "name": "Versailles-Ch. Lagache",
                "slug": "versailles+ch.+lagache"
            },

Notice how in v3, all of them were called: Versailles - Chardon Lagache Whereas in v4, we have three different variations: Versailles-Chardon-Lagache, Versailles-Chardon Lagach, Versailles-Ch. Lagache.

Is this expected? :smile:

pgrimaud commented 5 years ago

Thanks @ChadiEM

Good catch, I just fixed it. 😄

ChadiEM commented 5 years ago

Thanks for the quick fix! 😁

ChadiEM commented 5 years ago

Seems like the difference also exists for destinations!

https://api-ratp.pierre-grimaud.fr/v3/destinations/bus/88 https://api-ratp.pierre-grimaud.fr/v4/destinations/buses/88

pgrimaud commented 5 years ago

@ChadiEM Yes, but it's the only way to get all destinations for buses :

https://api-ratp.pierre-grimaud.fr/v3/destinations/bus/72 : 1 destinations https://api-ratp.pierre-grimaud.fr/v4/destinations/buses/72 : 2 destinations

ChadiEM commented 5 years ago

I think I was not clear about the expected difference,

In stations, after your latest fix:

https://api-ratp.pierre-grimaud.fr/v4/stations/buses/88

            {
                "name": "Montsouris - Tombe Issoire",
                "slug": "montsouris+++tombe+issoire"
            },

But in destinations, it is:

https://api-ratp.pierre-grimaud.fr/v4/destinations/buses/88

            {
                "name": "Montsouris Tombe Issoire",
                "way": "R"
            }

(it lacks the -)

Said differently, the station names are inconsistent between the destinations endpoint and the stations endpoint.

pgrimaud commented 5 years ago

@ChadiEM Yeah I know.

But it's the only way to retrieve correct data from the RATP SOAP API. Remember this issue : https://github.com/pgrimaud/horaires-ratp-api/issues/89