Hello, I was wondering if there is a way to see if a show has been retired from the API / any other method of checking systematically. I am aiming to implement a feature to notify users of a scheduled show they follow and want to figure out when to stop that notifcation if a show has been retired. Currently, I’m thinking of checking the schedule to see if the show is still in the schedule for that week. Would love to hear anyones thoughts! Thanks
Hi Camille, the information is available in the Spinitron user interface for logged on station members. Can you confirm that what you need is something in the API for it?
Yes, this is something I would like to see in the API.
Thanks
If I’m understanding correctly, can’t you determine whether a show has retired by GET /shows/id
returns 404 (meaning “a show with {id} does not exist or if it does but all its scheduled occurences elapsed in the past”).
That’s clever.
EDIT: I had said in this message the following but I was being daft because you can’t use any other search parameters with GET /shows/{id}
.
Combined with using the
start
query parameter you might be able to look ahead on that too.
That’s great, thanks! What happens if the show is not scheduled for that week but maybe for the week after (or is this not possible?)? Will it still return 404 for the gap week?
Thanks Camille
I’m going to assume the API doc is (apart from its horrific spelling errors) correct
GET /shows/{id}
- Get a Show by idThe response object represents the next occurrence of the show specified by {id}.
Status 404 is returned if a show with {id} does not exist or if it does but all its scheduled occurrences elapsed in the past.
You asked
Yes, the next occurrence can be any arbitrary time interval into the future. If there are any, the soonest is returned. If there are none, 404.
The schedule allows you to specify an arbitrary start date for its recurrence. And it could be something complex, for example the 5th Sunday of every month and the next one of those doesn’t happen until March next year.