cubehouse / themeparks

Unofficial API for accessing ride wait times and schedules for Disneyland, Disney World, Universal Studios, and many more parks
MIT License
540 stars 126 forks source link

Add Six Flags Ride Times #12

Open turnerniles opened 8 years ago

turnerniles commented 8 years ago

Looks like the 3rd party apps that provide six flag ride wait times only provide ride wait times based off other user input.

The six flags app does have ride wait times. But according to https://play.google.com/store/apps/details?id=com.sixflags.android&hl=en "Ride Wait Times for our most popular attractions! We’re rolling this feature out to select parks first and it will be available to Pass Holders only." So it seems like you'd have to have a pass to get access to ride wait times. Looking at reviews there are some parks with ride waits times and some without but it's not clear which have them and which don't.

cubehouse commented 8 years ago

Interesting!

Had a quick poke at their Android app, I can see some random parks have wait times and the others don't.

Going on the app description, it looks like they're rolling out app wait times into parks slowly. I've never been to a Six Flags park, so I don't know if they usually have electronic wait times anywhere and they're just migrating them online? Or if they just don't have wait time estimates anywhere?

That was pretty straight forward to work out however. I've pushed SixFlags support to master, however I want to get a list of parks that return good data later today (when the parks are actually open), so will leave this ticket active to keep tabs on which parks can be expected to actually have wait times.

Pushed out 3.0.3 with Six Flags beta support just now.

turnerniles commented 8 years ago

Wow, impressive!

cubehouse commented 8 years ago

Some quick code to run (during park opening hours) to see if parks actually have wait times (i.e, any wait time in the park is greater than 0)

var SixFlags = require("./SixFlags/SixFlagsParks");
var async = require("async");

var todo = [];
for (var i = 0, parkAPI; parkAPI = SixFlags[i++];) {
  var park = new parkAPI();
  todo.push(park);
}

var supportedParks = [];
var unsupportedParks = [];

async.eachSeries(todo, function(park, cb) {
  park.GetWaitTimes(function(err, res) {
    if (err) return cb(err);

    var anyTimes = false;
    for (var i = 0, ride; ride = res[i++];) {
      if (ride.waitTime > 0) {
        anyTimes = true;
        break;
      }
    }

    (anyTimes ? supportedParks : unsupportedParks).push(park.name);

    cb();
  });
}, function(err) {
  console.log("\n## Parks with >0 wait times\n");
  for (var i = 0, park; park = supportedParks[i++];) console.log(" * " + park);
  console.log("\n\n## Parks with 0 wait times\n");
  for (var i = 0, park; park = unsupportedParks[i++];) console.log(" * " + park);
});

Prints:

Parks with >0 wait times

Parks with 0 wait times

So not many parks have wait times supported yet it seems!

Some errors have popped up, so probably rolling out 3.0.4 or 3.0.5 shortly to fix some Six Flags problems where data changed when the parks came online...