This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Attraction
Scott Caratozzolo edited this page Jun 9, 2020
·
3 revisions
The Attraction class allows you to get information regarding a specific attraction.
To start, create an Attraction object:
import MouseTools
pirates = MouseTools.Attraction(80010177)
# Or
pirates = MouseTools.Attraction("80010177", sync_in_init=True)
# sync_on_init means sync the database with Disney on object instantiation. Default is True.
# This parameter is helpful when creating many objects back to back as syncing only once is necessary.
# Every class has this parameter.
Here are some of the Attraction class methods:
pirates.get_possible_ids() # Returns a list of possible ids that can be passed into the class
# For wait times:
pirates.get_wait_time() # Returns the current wait time, or None if there isn't one.
pirates.get_status() # Returns the status, such as "Closed" or "Operating"
pirates.fastpass_available() # Returns True if the attraction has FastPass
pirates.fastpass_times() # Returns a tuple of datetime objects of the current start and end of the FastPass period
# Some attractions have associated characters. This data can be retrieved using these methods.
pirates.check_associated_characters()
pirates.get_number_associated_characters()
pirates.get_associated_characters()
pirates.get_associated_character_ids()
# Data is gotten as JSON from Disney. You can access the raw data using:
pirates.get_raw_data() # Returns the data from the global-facility-service
pirates.get_raw_facilities_data() # Returns the data from the couchbase facilities channel.
pirates.get_raw_facilitystatus_data() # Returns the data from the couchbase facilitystatus channel.
For more information, run the following command from a terminal.
python -m pydoc MouseTools.Attraction