Closed hemi1986 closed 4 years ago
Sorry I've been a little AWOL recently, this looks great, and I will try and review it all properly later :)
You can auto-generate the README with a script in the /dev/ folder, which should evade any linter/pluginbs you're using :)
Hey, thanks for the reply. I will update the PR on the weekend because currently im afk enjoying some days at Phantasialand 😁
Thank you for your pull request!
Catering - can we remove these from the GetWaitTimes result please? This is only meant to rides. I'm happy for you to have a separate "Get Restaurants" or something just for Heide Park, but it's not something the library supports yet, so don't want to mix up rides and other things!
Special Events - similarly for special events, instead of having them in GetWaitTimes - can you add these into the OpeningTimes response? The this.Schedule.SetDate() function takes an extra parameter called "specialHours", which if set to true means the schedule being sent isn't part of the normal park hours (i.e, it's extra magic hours, or halloween horror nights etc.). You need to call the function once for your normal park hours, then call it again with the specialHours set to true for any other schedules for that day. I just recently updated CedarFairParkBase.js to do exactly this if you need an example.
Fastpass - if there is no way of getting this from the API, then hard-coding it is fine. Rather than using your switch statement, you can have an array sitting outside the class of the ride IDs that have fast passes, then call "fastPassRides.indexOf(rideID) >= 0" to see if it's in the array. A bit neater and easier to maintain in future :)
Edit: Also, enjoy Phantasialand! I've been meaning to go for a while now. Hoping to in the next year or so :)
Hi, sorry for the delay but i was a little busy the last days... I updated the code as you suggested :) Had to parse the special hours from the web calendar page as well because they dont provide any date information at their special event object of the api... I hope everything is fine now
Thank you for your update! No worries about rushing for anything - this is all for fun and intrigue :)
I'll try and review this and get it merged when I get some time over the next few days.
Thank you, this has now been merged in! Only change I made was to tidy up how the ride's name is presented by making the "alias" property a bit more human-readable.
Will push live later once I've done a general maintenance sweep of the library.
I added the Heidepark API.
This is my first pull-request, please let me know if something is not as you wish :)
All tests and linting passed so far.
Some information about the api and how i implemented it:
Openingtimes: The API doesent provide the Openingtimes and the App also redirects you to the mobile website. Now the whole calendar page ist parsed by cheerio. I hope this is ok but i know this will generate some work in the future maybe, when Heidepark desides to change their webpage.
Catering: The API provides opening hours for their restaurants and snack bars via the API, i added it to the waittimes and added the openinghours to the meta property because i didnt know where to provide it. Let me know if theres a better place for that
Special Events: The API provides some information on upcoming special events (only in german as far as i saw it). I also added it to the waittimes with the information at the metadata. same as for catering: let me know if i should change that.
Fastpass: There is a small text on their website where they list their fastpass rides. I hardcoded that Information and hope this is ok, but let me know if not :)
My VS Code did some changes to the readme ( i think because of a markdown plugin i use) i hope this is not a problem but i can revert this :)