Skip to content

Backend library to fetch live theme park data

Notifications You must be signed in to change notification settings

zacharyedwardbull/parksapi

 
 

Repository files navigation

ThemeParks.wiki Parks API

Unit Test Documentation Build

API Documentation

This is a backend module to fetch and query live data for themeparks. This source code powers the free-to-use API at ThemeParks.wiki

To fetch data from the API, you should look at the client libraries:

Fetching and parsing logic is provided in this source code. Most parks require some form of credentials, which are not supplied in this repo. You will need to source these yourself.

General support is available for the ThemeParks.wiki API, and not this source code (except for Sponsors with support benefits).

test.js contains a basic set of sanity checks and output validation, which also shows how a destination object can be accessed.

Each destination generates entities. Entities can be of various types:

  • Destinations
    • i.e, Resorts
    • These are not called resorts to avoid confusion for parks that are not part of resorts
    • eg. Walt Disney World Resort
  • Parks
    • All parks must be within a Destination entity
    • eg. Magic Kingdom
  • Attraction
    • A ride / transport / etc.
    • Attraction entities must be within a Destination entity (usually also within a park, but not always)
    • eg. Pirates of the Carribean
  • Resturant
    • A dining location within a destination
    • eg. Casey's Corner
  • Show
    • A show / parade entity with scheduled show times
    • eg. Main Street Electrical Parade

Entity Types Being Finalised - Destinations, Parks, and Attractions however, are well supported and unlikely to change

Adding Destinations

Best current documentation for this is to check out scripts/templateDestination.js and look at the existing supported destinations.

Setup index.js with your new class, and edit test.js to test your destination to check everything is setup correctly.

Destinations

  • WaltDisneyWorldResort
  • DisneylandResort
  • DisneylandParis
  • TokyoDisneyResort
  • HongKongDisneyland
  • ShanghaiDisneylandResort
  • UniversalStudios
  • UniversalOrlando
  • EuropaPark
  • Efteling
  • Phantasialand
  • SeaworldOrlando
  • SeaworldSanAntonio
  • SeaworldSanDiego
  • AltonTowers
  • ThorpePark
  • ChessingtonWorldOfAdventures
  • LegolandWindsor
  • LegolandOrlando
  • Gardaland
  • PortAventuraWorld
  • ParcAsterix
  • Toverland
  • Dollywood
  • SilverDollarCity
  • Plopsaland
  • HolidayPark

Configuration

Destination objects can be configured by either passing an object of variables into the constructor, or using environment variables (the preferred way).

To use environment variables, create a file called .env in the working directory of your project.

Environment variables are structured as:

  • Class name (upper case)
  • Underscore _
  • Variable name (upper case)

For example, the class WaltDisneyWorldResort has a resortId configuration variable which can be loaded through the environment variable WALTDISNEYWORLDRESORT_RESORTID

Some classes expose "parent scopes" to allow configuring environment variables once for a range of destinations. For example, Attractions.io's base URL can be configured once through ATTRACTIONSIO_BASEURL rather than configuring it identically for every destination.

Environment Variables (auto-generated):

WALTDISNEYWORLDRESORT_RESORTID
WALTDISNEYWORLDRESORT_RESORTSHORTCODE
WALTDISNEYWORLDRESORT_PARKIDS
WALTDISNEYWORLDRESORT_VIRTUALQUEUEURL
WALTDISNEYWORLDRESORT_GENIEDATA
DISNEYLANDRESORT_RESORTID
DISNEYLANDRESORT_RESORTSHORTCODE
DISNEYLANDRESORT_PARKIDS
DISNEYLANDRESORT_VIRTUALQUEUEURL
DISNEYLANDRESORT_GENIEDATA
DISNEYLANDPARIS_APIKEY
DISNEYLANDPARIS_APIBASE
DISNEYLANDPARIS_APIBASEWAITTIMES
DISNEYLANDPARIS_LANGUAGE
DISNEYLANDPARIS_STANDBYAPIBASE
DISNEYLANDPARIS_STANDBYAPIKEY
DISNEYLANDPARIS_STANDBYAUTHURL
DISNEYLANDPARIS_STANDBYAPIREFRESHTOKEN
DISNEYLANDPARIS_PREMIERACCESSAPIKEY
DISNEYLANDPARIS_PREMIERACCESSURL
DISNEYLANDPARIS_USERAGENT
TOKYODISNEYRESORT_APIKEY
TOKYODISNEYRESORT_APIAUTH
TOKYODISNEYRESORT_APIOS
TOKYODISNEYRESORT_APIBASE
TOKYODISNEYRESORT_APIVERSION
TOKYODISNEYRESORT_PARKIDS
HONGKONGDISNEYLAND_RESORTID
HONGKONGDISNEYLAND_RESORTSHORTCODE
HONGKONGDISNEYLAND_PARKIDS
HONGKONGDISNEYLAND_VIRTUALQUEUEURL
HONGKONGDISNEYLAND_GENIEDATA
SHANGHAIDISNEYLANDRESORT_APIBASE
SHANGHAIDISNEYLANDRESORT_APIAUTH
SHANGHAIDISNEYLANDRESORT_PARKIDS
UNIVERSALSTUDIOS_CITY
UNIVERSALSTUDIOS_RESORTSLUG
UNIVERSALSTUDIOS_SECRETKEY
UNIVERSALSTUDIOS_APPKEY
UNIVERSALSTUDIOS_VQUEUEURL
UNIVERSALSTUDIOS_BASEURL
UNIVERSALORLANDO_CITY
UNIVERSALORLANDO_RESORTSLUG
UNIVERSALORLANDO_SECRETKEY
UNIVERSALORLANDO_APPKEY
UNIVERSALORLANDO_VQUEUEURL
UNIVERSALORLANDO_BASEURL
EUROPAPARK_PARKS
EFTELING_APIKEY
EFTELING_APIVERSION
EFTELING_APPVERSION
EFTELING_SEARCHURL
EFTELING_WAITTIMESURL
PHANTASIALAND_APIBASE
SEAWORLDORLANDO_RESORTIDS
SEAWORLDORLANDO_RESORTID
SEAWORLDORLANDO_RESORTSLUG
SEAWORLDORLANDO_APPID
SEAWORLDORLANDO_BASEURL
SEAWORLDSANANTONIO_RESORTIDS
SEAWORLDSANANTONIO_RESORTID
SEAWORLDSANANTONIO_RESORTSLUG
SEAWORLDSANANTONIO_APPID
SEAWORLDSANANTONIO_BASEURL
SEAWORLDSANDIEGO_RESORTIDS
SEAWORLDSANDIEGO_RESORTID
SEAWORLDSANDIEGO_RESORTSLUG
SEAWORLDSANDIEGO_APPID
SEAWORLDSANDIEGO_BASEURL
ALTONTOWERS_DESTINATIONID
ALTONTOWERS_PARKID
ALTONTOWERS_INITIALDATAVERSION
ALTONTOWERS_APPBUILD
ALTONTOWERS_APPVERSION
ALTONTOWERS_BASEURL
ALTONTOWERS_DEVICEIDENTIFIER
ALTONTOWERS_APIKEY
ALTONTOWERS_CALENDARURL
THORPEPARK_DESTINATIONID
THORPEPARK_PARKID
THORPEPARK_INITIALDATAVERSION
THORPEPARK_APPBUILD
THORPEPARK_APPVERSION
THORPEPARK_BASEURL
THORPEPARK_DEVICEIDENTIFIER
THORPEPARK_APIKEY
THORPEPARK_CALENDARURL
CHESSINGTONWORLDOFADVENTURES_DESTINATIONID
CHESSINGTONWORLDOFADVENTURES_PARKID
CHESSINGTONWORLDOFADVENTURES_INITIALDATAVERSION
CHESSINGTONWORLDOFADVENTURES_APPBUILD
CHESSINGTONWORLDOFADVENTURES_APPVERSION
CHESSINGTONWORLDOFADVENTURES_BASEURL
CHESSINGTONWORLDOFADVENTURES_DEVICEIDENTIFIER
CHESSINGTONWORLDOFADVENTURES_APIKEY
CHESSINGTONWORLDOFADVENTURES_CALENDARURL
LEGOLANDWINDSOR_DESTINATIONID
LEGOLANDWINDSOR_PARKID
LEGOLANDWINDSOR_INITIALDATAVERSION
LEGOLANDWINDSOR_APPBUILD
LEGOLANDWINDSOR_APPVERSION
LEGOLANDWINDSOR_BASEURL
LEGOLANDWINDSOR_DEVICEIDENTIFIER
LEGOLANDWINDSOR_APIKEY
LEGOLANDWINDSOR_CALENDARURL
LEGOLANDORLANDO_DESTINATIONID
LEGOLANDORLANDO_PARKID
LEGOLANDORLANDO_INITIALDATAVERSION
LEGOLANDORLANDO_APPBUILD
LEGOLANDORLANDO_APPVERSION
LEGOLANDORLANDO_BASEURL
LEGOLANDORLANDO_DEVICEIDENTIFIER
LEGOLANDORLANDO_APIKEY
LEGOLANDORLANDO_CALENDARURL
GARDALAND_DESTINATIONID
GARDALAND_PARKID
GARDALAND_INITIALDATAVERSION
GARDALAND_APPBUILD
GARDALAND_APPVERSION
GARDALAND_BASEURL
GARDALAND_DEVICEIDENTIFIER
GARDALAND_APIKEY
GARDALAND_CALENDARURL
PORTAVENTURAWORLD_APIBASE
PARCASTERIX_APIBASE
PARCASTERIX_LANGUAGE
TOVERLAND_APIBASE
TOVERLAND_CALENDARURL
TOVERLAND_AUTHTOKEN
TOVERLAND_LANGUAGES
DOLLYWOOD_DESTINATIONID
DOLLYWOOD_DESTINATIONSLUG
DOLLYWOOD_CRMBASEURL
DOLLYWOOD_CRMGUID
DOLLYWOOD_CRMATTRACTIONSID
DOLLYWOOD_CRMDININGID
DOLLYWOOD_CRMSHOWID
DOLLYWOOD_APIBASE
DOLLYWOOD_CRMAUTH
SILVERDOLLARCITY_DESTINATIONID
SILVERDOLLARCITY_DESTINATIONSLUG
SILVERDOLLARCITY_CRMBASEURL
SILVERDOLLARCITY_CRMGUID
SILVERDOLLARCITY_CRMATTRACTIONSID
SILVERDOLLARCITY_CRMDININGID
SILVERDOLLARCITY_CRMSHOWID
SILVERDOLLARCITY_APIBASE
SILVERDOLLARCITY_CRMAUTH
PLOPSALAND_DESTINATIONSLUG
PLOPSALAND_PARKSLUG
PLOPSALAND_BASEURL
PLOPSALAND_BASELANG
PLOPSALAND_CLIENTID
PLOPSALAND_CLIENTSECRET
HOLIDAYPARK_DESTINATIONSLUG
HOLIDAYPARK_PARKSLUG
HOLIDAYPARK_BASEURL
HOLIDAYPARK_BASELANG
HOLIDAYPARK_CLIENTID
HOLIDAYPARK_CLIENTSECRET

About

Backend library to fetch live theme park data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%