Try 30 days of free premium.

Premium API - PUT marked episodes: possible bug

VortX wrote 6 years ago: 1

The attribute marked_at is not updated when marking an already marked episode using the Premium API without explicitly specifying a value for the attribute, but it is updated when using the website or when using the Premium API if the episode was not already marked.

According to the API documentation:

Implementation Notes

Set marked_at to NULL or leave it out to use the current time.

Reproduce:

1. mark an "Unwatched" episode to "Acquired" on the site, either using the Premium API or the website => the attribute marked_at is set to the current time

2. mark the same episode as "Watched" using the Premium API without explicitly specifying the marked_at attribute or setting it to NULL => the attribute marked_at is not updated

3. mark the same episode to "Skipped" using the website => the attribute marked_at is set to the current time

I think it is a bug, because the marked_at attribute is updated when using the site but not when using the API.

EDIT:

if this is in fact a bug, it may be worth checking whether the same happens with the attribute voted_at when using PUT voted episodes or PUT voted shows


david wrote 6 years ago: 1

Your report is correct; the behavior in the API is different from the site: on the site, changing an existing episode's watch status (e.g. from acquired to watched) will automatically update the timestamp. In the API, this isn't the case and the timestamp is only automatically set on create.

I'm not sure what to think of this yet. Right now I think it would indeed be in line with PUT semantics to make updates behave the same as creates. I'll give it some thought, thanks for the report!

Try 30 days of free premium.