Constructor
new TE2Destination(options)
- Description:
- Create a new TE2Destination object
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Configuration options
Properties
|
Classes
Methods
(private) _buildPOIMap(poiData) → {Map}
- Description:
- Build a POI lookup map from POI data array
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
poiData |
Array | Array of POI data objects |
Returns:
Map of POI ID to POI object
- Type
- Map
(async, private) _buildShowEntityFromEvent(event, poiMap) → {object}
- Description:
- Build a show entity from event calendar data
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
object | Event data from calendar |
poiMap |
Map | Map of POI IDs to POI objects |
Returns:
Show entity object
- Type
- object
(async, private) _fetchCategories() → {Promise.<object>}
- Description:
- Fetch category definitions from the TE2 API
- Source:
Returns:
Category data with POI associations
- Type
- Promise.<object>
(async, private) _fetchScheduleData(options) → {Promise.<object>}
- Description:
- Fetch venue operating hours schedule data
- Source:
Parameters:
| Name | Type | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Options object
Properties
|
Returns:
Schedule data with daily operating hours
- Type
- Promise.<object>
(async, private) _findLocationForShowEntity(associatedPois, basePoi) → {object|null}
- Description:
- Find location data from associated POIs or fallback sources
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
associatedPois |
Array | Array of associated POI objects |
basePoi |
object | Base POI object to check for location |
Returns:
Location object with latitude/longitude or null
- Type
- object | null
(async, private) _getEventCalendarData() → {Promise.<object>}
- Description:
- Get parsed event calendar data with showtimes organized by event Filters out past events and creates showtime objects
- Source:
Returns:
Object containing events, eventsById map, and showtimesByEvent map
- Type
- Promise.<object>
(async, private) _getFilteredEntities(categoryData, data, options) → {Promise.<Array.<object>>}
- Description:
- Filter POI data to get entities matching specified types/IDs Supports custom filtering via includeFn callback
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
categoryData |
object | Object containing types and entities arrays
Properties
|
|||||||||
data |
object | Additional data to merge into each entity | |||||||||
options |
object | Options object
Properties
|
Returns:
Array of filtered entity objects
- Type
- Promise.<Array.<object>>
(async, private) _getParsedCategories(params) → {Promise.<object>}
- Description:
- Parse category data to find POI entities matching the given types Recursively includes child categories based on parent relationships
- Source:
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
params |
object | Parameters
Properties
|
Returns:
Object containing matched types and entity IDs
- Type
- Promise.<object>
(async) buildAttractionEntities() → {Promise.<Array.<object>>}
- Description:
- Build attraction entities for this destination Includes rides identified by category or by presence of wait time/ride indicator tags
- Source:
Returns:
Array of attraction entity objects
- Type
- Promise.<Array.<object>>
buildBaseEntityObject(data) → {object}
- Description:
- Build a base entity object from TE2 API data Extracts common fields like name, ID, and location
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object | Raw entity data from TE2 API |
Returns:
Base entity object with standardized fields
- Type
- object
(async) buildDestinationEntity() → {Promise.<object>}
- Description:
- Build the destination entity representing this venue
- Source:
Returns:
Destination entity object
- Type
- Promise.<object>
(async) buildParkEntities() → {Promise.<Array.<object>>}
- Description:
- Build park entities for this destination In TE2, the destination and park are typically the same venue
- Source:
Returns:
Array of park entity objects
- Type
- Promise.<Array.<object>>
(async) buildRestaurantEntities() → {Promise.<Array.<object>>}
- Description:
- Build restaurant/dining entities for this destination
- Source:
Returns:
Array of restaurant entity objects
- Type
- Promise.<Array.<object>>
(async) buildShowEntities() → {Promise.<Array.<object>>}
- Description:
- Build show/entertainment entities for this destination Combines show entities from categories and event calendar data
- Source:
Returns:
Array of show entity objects
- Type
- Promise.<Array.<object>>
(async) fetchEventCalendar(options) → {Promise.<object>}
- Description:
- Fetch event calendar data including shows and entertainment schedules
- Source:
Parameters:
| Name | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Options object
Properties
|
Returns:
Event calendar data with events and schedules
- Type
- Promise.<object>
(async) getAttractionTypes() → {Promise.<object>}
- Description:
- Get parsed category data for attraction/ride types
- Source:
Returns:
Object with types array and entities array
- Type
- Promise.<object>
(async) getDestinationData() → {Promise.<object>}
- Description:
- Fetch venue/destination metadata
- Source:
Returns:
Destination data including name and location
- Type
- Promise.<object>
(async) getDiningTypes() → {Promise.<object>}
- Description:
- Get parsed category data for dining types
- Source:
Returns:
Object with types array and entities array
- Type
- Promise.<object>
(async) getPOIData() → {Promise.<Array>}
- Description:
- Fetch all Points of Interest (attractions, dining, shows, etc.) for this venue
- Source:
Returns:
Array of POI objects
- Type
- Promise.<Array>
(async) getPOIStatus() → {Promise.<object>}
- Description:
- Fetch current POI status data including wait times and operational status
- Source:
Returns:
POI status data
- Type
- Promise.<object>
(async) getShowTypes() → {Promise.<object>}
- Description:
- Get parsed category data for show/entertainment types
- Source:
Returns:
Object with types array and entities array
- Type
- Promise.<object>