WSDOT / wsdot-kotlin-app

Source Code for the WSDOT Android Application
GNU General Public License v3.0
1 stars 3 forks source link

Find out if there is a way to get stop information for Anacortes sailings #85

Open loganSims opened 4 years ago

loganSims commented 4 years ago

For example, the "Anacortes to Lopez Island" sailing can make multiple stops along the way

loganSims commented 3 years ago

the sailings/ endpoint offers stop information in a form that matches the web presentation.

It should be possible to connect the times to times in the schedule JSON to list stops made a long the way. For example we could add something like a new Steps field:

"Sailings":[
               {
                  ...
                  "DepartingTerminalName":"Anacortes",
                  "ArrivingTerminalName":"Orcas Island",
                  ...
                  "Times":[
                     {
                        "DepartingTime":"2021-02-08 05:30 AM",
                        "ArrivingTime":"2021-02-08 06:35 AM",
                        "AnnotationIndexes":[],
                        "Steps": [
                            {
                               "terminal": "Lopez Island",
                               "time": "06:20 AM"
                            }
                        ]
                     },

The above schedule is shown on the website as:

Screen Shot 2021-02-08 at 9 35 34 AM

It's important to note the 7:15 AM stop is also returned from the sailings/ endpoint, but probably won't be needed since its after the arrival time for the destination terminal, Orcas Island. Will need to add some logic to make sure we aren't showing stop times after the destination stop time.