new Park(options)
Create a new Park object
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Members
-
Cache
-
Get the cache object for this park
-
FastPass :Boolean
-
Does this park offer fast-pass services?
Type:
- Boolean
-
FastPassReturnTimes :Boolean
-
Does this park tell you the fast-pass return times?
Type:
- Boolean
-
GetNumScheduleDays
-
How many days are returned by this park's schedule?
-
Schedule :Schedule
-
Get this park's raw schedule object
Type:
-
SupportsOpeningTimes :Boolean
-
Does this park offer opening time information?
Type:
- Boolean
-
SupportsRideSchedules :Boolean
-
Does this park offer opening times for rides?
Type:
- Boolean
-
SupportsWaitTimes :Boolean
-
Does this park offer wait time information?
Type:
- Boolean
-
UserAgent :String
-
Get this park's useragent string for making network requests This is usually randomly generated on object construction
Type:
- String
-
UserAgent :string|function
-
Set this park's useragent Can set user agent to a defined string or use a generator function (see random-useragent library)
Type:
- string | function
Methods
-
BuildWaitTimesResponse()
-
Build the Wait Times response from JSON data This will create/fetch Ride objects based on the supplied JSON data
-
GetOpeningTimes()
-
Get opening times for this park
-
GetRideObject(rideId)
-
Find (or create) a ride object with the given ID
Parameters:
Name Type Description rideId
* ID to search for/create ride -
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.
-
HTTP()
-
Make an HTTP request using this park's user agent and HTTP settings
-
UpdateRide(id, options)
-
Update a ride state
Parameters:
Name Type Description id
String The ride ID to update options
Object Ride options to update