Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Walt Disney World - Entertainment Area Opening Times Fetching
// include themeparks library
const themeparks = require("themeparks");
// extend random Disney World park and override few bits we need (WDW Magic Kingdom has most the configuration already that we need)
class DisneysTyphoonLagoon extends themeparks.Parks.WaltDisneyWorldMagicKingdom {
constructor(options = {}) {
options.name = options.name || "Disney's Typhoon Lagoon";
options.latitude = options.latitude || 28.3650;
options.longitude = options.longitude || -81.5277;
// Disney API configuration for Typhoon Lagoon
options.park_id = options.park_id || "80007981";
// return water-park schedules
options.schedule_filters = ["water-park"];
// inherit from base class
super(options);
}
}
class DisneysBlizzardBeach extends themeparks.Parks.WaltDisneyWorldMagicKingdom {
constructor(options = {}) {
options.name = options.name || "Disney's Blizzard Beach";
options.latitude = options.latitude || 28.3525;
options.longitude = options.longitude || -81.5731;
// Disney API configuration for Blizzard Beach
options.park_id = options.park_id || "80007834";
// return water-park schedules
options.schedule_filters = ["water-park"];
// inherit from base class
super(options);
}
}
class DisneySprings extends themeparks.Parks.WaltDisneyWorldMagicKingdom {
constructor(options = {}) {
options.name = options.name || "Disney Springs";
options.latitude = options.latitude || 28.3709;
options.longitude = options.longitude || -81.5195;
// Disney API configuration for Disney Springs
options.park_id = options.park_id || "10460";
// return Entertainment-Venue schedules
options.schedule_filters = ["Entertainment-Venue"];
// inherit from base class
super(options);
}
}
class ESPNWideWorldOfSportsComplex extends themeparks.Parks.WaltDisneyWorldMagicKingdom {
constructor(options = {}) {
options.name = options.name || "ESPN Wide World of Sports Complex";
options.latitude = options.latitude || 28.3378;
options.longitude = options.longitude || -81.5568;
// Disney API configuration for ESPN Wide World of Sports Complex
options.park_id = options.park_id || "80008033";
// return Entertainment-Venue schedules
options.schedule_filters = ["Entertainment-Venue"];
// inherit from base class
super(options);
}
}
class DisneysBoardWalk extends themeparks.Parks.WaltDisneyWorldMagicKingdom {
constructor(options = {}) {
options.name = options.name || "Disney's BoardWalk";
options.latitude = options.latitude || 28.3672;
options.longitude = options.longitude || -81.5563;
// Disney API configuration for Disney's BoardWalk
options.park_id = options.park_id || "80008259";
// return Entertainment-Venue schedules
options.schedule_filters = ["Entertainment-Venue"];
// inherit from base class
super(options);
}
}
const Park = new DisneysTyphoonLagoon();
Park.GetOpeningTimes().then((hours) => {
console.log(hours);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.