cubehouse / themeparks

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

Add virtual line times to Universal #292

Closed DougSisk closed 4 years ago

DougSisk commented 4 years ago

Addresses #291

Due to social distancing rules, Universal has increased their usage of their virtual line system. It's a similar system to Disney's FastPass+, where you're given the option of multiple "appointments" you can book. Since it's not exactly FastPass, and the fastPass object is used to denote what rides have Express, I simply added the available times via the metadata. Universal supplies a bunch of internal capacity related data with each appointment, but really all we need to know is what the start & end time is for each appointment.

I would think Hollywood will implement a similar system, so I kept that in mind and we can turn on support for Hollywood with a simple option if they do.

I worked on this after-hours, so I'll need to wait until tomorrow to see if the data populates correctly. Once it does, I'll supply an example ride object with the new array.

DougSisk commented 4 years ago

Confirmed working. Here's an example ride object that has times available:

{
    meta: {
        latitude: 28.475881,
        longitude: -81.469363,
        virtualLine: true,
        singleRider: false,
        virtualLineAvailableTimes: [
            {
                start: '2020-06-12T10:40:00-04:00',
                end: '2020-06-12T11:10:00-04:00'
            },
            {
                start: '2020-06-12T11:20:00-04:00',
                end: '2020-06-12T11:50:00-04:00'
            },
            {
                start: '2020-06-12T12:00:00-04:00',
                end: '2020-06-12T12:30:00-04:00'
            },
            {
                start: '2020-06-12T12:40:00-04:00',
                end: '2020-06-12T13:10:00-04:00'
            },
            {
                start: '2020-06-12T13:20:00-04:00',
                end: '2020-06-12T13:50:00-04:00'
            },
            {
                start: '2020-06-12T14:00:00-04:00',
                end: '2020-06-12T14:30:00-04:00'
            },
            {
                start: '2020-06-12T14:40:00-04:00',
                end: '2020-06-12T15:10:00-04:00'
            },
            {
                start: '2020-06-12T15:20:00-04:00',
                end: '2020-06-12T15:50:00-04:00'
            },
            {
                start: '2020-06-12T16:00:00-04:00',
                end: '2020-06-12T16:30:00-04:00'
            },
            {
                start: '2020-06-12T16:40:00-04:00',
                end: '2020-06-12T17:10:00-04:00'
            },
            {
                start: '2020-06-12T17:20:00-04:00',
                end: '2020-06-12T17:50:00-04:00'
            },
            {
                start: '2020-06-12T18:00:00-04:00',
                end: '2020-06-12T18:30:00-04:00'
            },
            {
                start: '2020-06-12T18:40:00-04:00',
                end: '2020-06-12T19:00:00-04:00'
            }
        ]
    },
    id: 'UniversalStudiosFlorida_14348',
    name: 'Race Through New York Starring Jimmy Fallon™',
    active: true,
    waitTime: 5,
    fastPass: true,
    lastUpdate: '2020-06-12T14:20:18.580Z',
    status: 'Operating'
}
cubehouse commented 4 years ago

Thank you for this, I will push this live to npm later today.