Closed maxatdetroit closed 5 months ago
Note to self:
Looks like we're using the Django API but only using the 'next pickups' portion of the response and then making some assumptions about the cadence of garbage/bulk/recycling/yard to project into the future. I'm going to remove the assumptions and use the "schedule" data from the response. We'll just have to update the calendar to fetch the subsequent month of schedule if someone goes to the next month.
Describe the bug
Starting next week DPW is switching its curbside services from GFL to Priority Waste (WM is not changing), and switching all services to weekly (i.e., recycling, bulk and yard waste will be picked up for all customers on a weekly basis instead of biweekly like they are now) - @karlkaebnick created a branch on the django apps repo to handle this (which I will deploy on friday)), but it looks like - at least for the calendar that you get if you go to https://detroitmi.gov/webapp/find-your-waste-pickup-schedule and click on "my schedule" - that the pickup dates are getting pulled from somewhere else.
We need to update the app to get the full schedule from the Django API since it will handle handles and service changes like described above. E.g., if you want to get the schedule for all of July, with services the week of the 4th rescheduled properly, you can call
https://apis.detroitmi.gov/waste_schedule/details/8/year/2024/month/7/
and pull the schedule from the response that you get back (look for the array of data under "schedule" in the json response).