cubehouse / themeparks

Unofficial API for accessing ride wait times and schedules for Disneyland, Disney World, Universal Studios, and many more parks
MIT License
545 stars 126 forks source link

Disneyland Paris #2

Closed PhilippeP62 closed 8 years ago

PhilippeP62 commented 8 years ago

Hi, for info, Disneyland Paris has changed website and mobile app to DisneyParks US clones. As so , the Pure Agency servers do not serve valid data anymore.(stuck on 11/02/2015) It seems (from the website page source) that the code used tu identify parks are dlp for Disneyland Park, and wds for Walt Disney Studios. I've tried to mimic your US parks code for Disneyland Paris , but so far I got only blank page back.

Philippe

cubehouse commented 8 years ago

Interesting!

I'll get right on this. What URLs or any interesting data have you got so far for me to poke at?

PhilippeP62 commented 8 years ago

There's not a lot to chew on , the Paris website is based on the WDW one (lots of the code in the source still refers to WDW stuff) and the new app uses encrypted data connections. :/

cubehouse commented 8 years ago

So looks like Disneyland Paris indeed is now part of the WDW API! Nice :) The old Disneyland Paris API was... a creative use of web technologies...... :|

The resort is generally accessed under ID "dlp". Disneyland Park ID is "P1" and Walt Disney Studios ID is "P2"

As an example, to get a list of all ride and park opening times: /mobile-service/public/ancestor-activities-schedules/dlp;entityType=destination?filters=theme-park%2CAttraction&startDate=2015-12-13&endDate=2016-01-22&region=gb

There are a bunch of other filters you can use to get other schedule times (water-park, land, Entertainment-Venue, resort, Entertainment, Event, Spa, tour, recreation-activity, Recreation, restaurant, MerchandiseFacility) - but I'm going to stick with the basics: parks and rides.

The app fetches all the ride times in bulk using a POST request to /bulk-service/execute, which includes a list of the GET requests we actually want. Example data: {"requests":[{"headers":{"Accept":"application/json"},"method":"GET","url":"[BASEURL]/facility-service/theme-parks/P1;entityType\u003dtheme-park;destination\u003ddlp/wait-times?mobile\u003dtrue\u0026region\u003dgb"},{"headers":{"Accept":"application/json"},"method":"GET","url":"[BASEURL]/facility-service/theme-parks/P2;entityType\u003dtheme-park;destination\u003ddlp/wait-times?mobile\u003dtrue\u0026region\u003dgb"}]}

So from this we can extract that it's using the same API URLs as all the American parks, but the requests demand a couple of extra parameters: (\u003d is "=" encoded) /facility-service/theme-parks/P2;destination\u003ddlp/wait-times?region=fr

The DLP API requires the "region" query string parameter, otherwise it'll fail, so I'm going to have to add that into the code to supply that for DLP.

cubehouse commented 8 years ago

Please see d015b93fa8479f887dc1c69fe1e8281c85bf2e6b for my changes to move Disneyland Paris requests to use the WDW API.

I'm still working on getting Tokyo Disneyland into the library and a few changes I have done will break the API for some people making manual requests to the WDW API, so I'll be pushing this out as 2.0.0 once I've tidied it all up a bit.

I'll close this ticket once I have rolled this out to NPM. But feel free to pull the code directly and see if it works. I was already planning on adding schedule support to WDW anyway, so looks like it's a good time to finish that off :)

Does this mean DLP might get magic bands????? That would be awesome. Last time I went to DLP I was passed 2 room keys, 12 meal vouchers (2 per meal for 2 people for 2 days) and each fastpass gave me another piece of paper. Too much paper!

PhilippeP62 commented 8 years ago

Well, the Disneyland Paris 1.0 solution was crappy and wide open but working

Magic Band is a possibility , they allready did some very limited tests but it has a cost and DLP is not really rich, it's the ugly duck in the Disney Parks family :) so only time will tell...

cubehouse commented 8 years ago

Thank you very much for your bug report.

This fix is now published on npm as version "2.0.0" - see the main README.md for other changes.

Thanks!

PhilippeP62 commented 8 years ago

That was quick :)