twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
72 stars 7 forks source link

Ad Schedule documentation incorrect #879

Closed serycodes closed 6 months ago

serycodes commented 6 months ago

Brief description The Get Ad Schedule endpoint returns epoch timestamps for next_ad_at, last_ad_at, and snooze_refresh_at. The documentation states these should be strings with the UTC timestamp in RFC3339 format. The endpoint is returning the wrong format.

In addition, the snooze_count, duration, and preroll_free_time says they should be integers, but the example provided returns strings. The example in the documentation just needs to be corrected. Easy fix.

The Channel Ad Break Begin Event documentation also refers to timestamp when it should be started_at. Easy fix.

How to reproduce GET https://api.twitch.tv/helix/channels/ads?broadcaster_id=30121622

{
    "data": [
        {
            "snooze_count": 3,
            "snooze_refresh_at": 0,
            "next_ad_at": 1702019672,
            "duration": 90,
            "last_ad_at": 0,
            "preroll_free_time": 0
        }
    ]
}

Expected behavior GET https://api.twitch.tv/helix/channels/ads?broadcaster_id=30121622

{
    "data": [
        {
            "snooze_count": 3,
            "snooze_refresh_at": "2023-08-01T23:08:18+00:00",
            "next_ad_at": "2023-08-01T23:08:18+00:00",
            "duration": 90,
            "last_ad_at": "2023-08-01T23:08:18+00:00",
            "preroll_free_time": 0
        }
    ]
}
iProdigy commented 6 months ago

re: seconds vs strings, see #857 - tho barry claims epoch seconds is intentional (i.e, docs are wrong)

re: eventsub timestamp, see #850

serycodes commented 6 months ago

Ha, should have checked first.