new MerlinPark( [options])
Create new MerlinPark Object.
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
Extends
Members
-
APIBase
-
Get the API Base URL
-
Cache
-
Get the cache object for this park
- Inherited From:
- Overrides:
-
DataVersion
-
Get the latest data version timestamp
-
FallbackData
-
Get default fallback data for this Merlin Park
-
FastPass :Boolean
-
Does this park offer fast-pass services?
Type:
- Boolean
- Inherited From:
- Overrides:
-
FastPassReturnTimes :Boolean
-
Does this park tell you the fast-pass return times?
Type:
- Boolean
- Inherited From:
- Overrides:
-
GetNumScheduleDays
-
How many days are returned by this park's schedule?
- Inherited From:
- Overrides:
-
Schedule :Schedule
-
Get this park's raw schedule object
Type:
- Inherited From:
- Overrides:
-
SupportsOpeningTimes :Boolean
-
Does this park offer opening time information?
Type:
- Boolean
- Inherited From:
- Overrides:
-
SupportsRideSchedules :Boolean
-
Does this park offer opening times for rides?
Type:
- Boolean
- Inherited From:
- Overrides:
-
SupportsWaitTimes :Boolean
-
Does this park offer wait time information?
Type:
- Boolean
- Inherited From:
- Overrides:
-
UserAgent :String
-
Get this park's useragent string for making network requests This is usually randomly generated on object construction
Type:
- String
- Inherited From:
- Overrides:
Methods
-
BuildWaitTimesResponse()
-
Build the Wait Times response from JSON data This will create/fetch Ride objects based on the supplied JSON data
- Inherited From:
- Overrides:
-
FetchOpeningTimes()
-
Fetch Merlin Park opening time data
Returns:
- Type
- Promise
-
FetchParkData()
-
Fetch/Sync park data Warning: full sync is ~30MB
-
FetchWaitTimes()
-
Fetch Wait times
Returns:
- Type
- Promise
-
GenerateUserID()
-
Generate (or fetch a cached) user ID
-
GetOpeningTimes()
-
Get opening times for this park
- Inherited From:
- Overrides:
-
GetParkData()
-
Get (or fetch new) park data
-
GetRideObject(rideId)
-
Find (or create) a ride object with the given ID
Parameters:
Name Type Description rideId
* ID to search for/create ride - Inherited From:
- Overrides:
-
GetWaitTimes()
-
Get waiting times for rides from this park If the last argument is a function, this will act as a callback. Callback will call with callback(error, data) Data will be null if error is present If the last argument is not a function, this will return a Promise.
- Inherited From:
- Overrides:
-
HTTP()
-
Make an HTTP request using this park's user agent and HTTP settings
-
MakeAPICall(options)
-
Generic API request function, will sort out API token and send auth headers
Parameters:
Name Type Description options
* Properties
Name Type Argument Default Description url
String URL to access method
String <optional>
GET method to use data
Object <optional>
{} data/query string to use -
RegisterDevice()
-
Get an API token from cache or through registering a new device
-
UpdateRide(id, options)
-
Update a ride state
Parameters:
Name Type Description id
String The ride ID to update options
Object Ride options to update - Inherited From:
- Overrides: