-
-
Notifications
You must be signed in to change notification settings - Fork 126
Migrating from 3.0 to 4.0
James Holding edited this page Feb 4, 2018
·
4 revisions
The API has had a complete rewrite for 4.0. While most of the functions actually behave the same, there are some minor differences you'll need to know about if you wish to migrate to version 4.0.
The library has changed from wdwJS to themeparks, to better represent the library supporting a bunch of non-WDW parks.
Change
var wdwJS = require("wdwjs");
to
var themeparks = require("themeparks");
Also update your package.json from:
"wdwjs": "^3.0.0",
to
"themeparks": "^4.0.0"
Previously, all the park objects were available directly from the library's main entry. For example, you used to be able access a park using wdwJS.MagicKingdom etc.
Now, there are two ways to access parks.
- wdwJS.AllParks
- An array of all supported parks
- wdwJS.Parks
- An object of all supported parks
- Park ID => Park Object
To migrate from wdwJS 3.0 to wdwJS 4.0, change
wdwJS.[PARK ID]
to
themeparks.Parks.[PARK ID]
Previously (wdwJS 3.0) | Now (themeparks 4.0) |
---|---|
park.name | park.Name |
park.timezone | park.Timezone |
park.supports_ride_schedules | park.SupportsRideSchedules |