ShanghaiDisneylandResort

ShanghaiDisneylandResort

Shanghai Disneyland Resort

Constructor

new ShanghaiDisneylandResort(options)

Description:
  • Create a new ShanghaiDisneylandResort
Source:
Parameters:
Name Type Description
options object

Classes

ShanghaiDisneylandResort

Methods

(async) _buildAttractionObject()

Source:

(async) _buildEntities(filterFn)

Description:
  • Build array of entities matching filterFn
Source:
Parameters:
Name Type Description
filterFn function

(async) _dumpDB() → {buffer}

Description:
  • Dump the SHDR database to a buffer
Source:
Returns:
Type
buffer

(async) _fetchWaitTimes() → {array.<object>}

Description:
  • Fetch wait time data
Source:
Returns:
Type
array.<object>

(async) _init()

Source:

(async) _loadDB(buff)

Description:
  • Load a SHDR database from an existing buffer
Source:
Parameters:
Name Type Description
buff buffer

(async) _refreshAttractionData()

Description:
  • Refresh attraction data, getting new and updated documents from the API
Source:

(async) buildAttractionEntities()

Description:
  • Build the attraction entities for this destination
Source:

buildBaseEntityObject(data) → {object}

Description:
  • Helper function to build a basic entity document Useful to avoid copy/pasting
Source:
Parameters:
Name Type Description
data object
Returns:
Type
object

(async) buildDestinationEntity()

Description:
  • Build the destination entity representing this destination
Source:

(async) buildEntityLiveData()

Source:

(async) buildEntityScheduleData() → {array.<object>}

Description:
  • Return schedule data for all scheduled entities in this destination Eg. parks
Source:
Returns:
Type
array.<object>

(async) buildParkEntities()

Description:
  • Build the park entities for this destination
Source:

(async) buildRestaurantEntities()

Description:
  • Build the restaurant entities for this destination
Source:

(async) buildShowEntities()

Description:
  • Build the show entities for this destination
Source:

extractEntityData(doc) → {object}

Description:
  • Extract the key information from an attraction entity doc ID
Source:
Parameters:
Name Type Description
doc string | object Either the document or the document ID
Returns:
Type
object

(async) getAccessToken()

Description:
  • Get an access token for making requests to the API
Source:

(async) getAllEntityKeys() → {array.<string>}

Description:
  • Get all stored entities
Source:
Returns:
Type
array.<string>

(async) getAttractionData()

Description:
  • Get all attraction data
Source:

(async) getEntity(id)

Description:
  • Get an entity doc using it's ID from the local database
Source:
Parameters:
Name Type Description
id string