twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
73 stars 6 forks source link

Get Ad Schedule - `length_seconds`, `preroll_free_time_seconds` and `snooze_count` documented integers but example uses strings #857

Open Emilgardis opened 12 months ago

Emilgardis commented 12 months ago

Brief description

Get Ad Schedule documents length_seconds, preroll_free_time_seconds and snooze_count as integers, while the example shows strings.

Expected documentation

{
  "data": [
    {
      "next_ad_at" : "2023-08-01T23:08:18+00:00",
      "last_ad_at" : "2023-08-01T23:08:18+00:00",
      "length_seconds" : 60,
      "preroll_free_time_seconds" : 90,
      "snooze_count" : 1,
      "snooze_refresh_at" : "2023-08-01T23:08:18+00:00",
    },
  ],
}

Additional context or questions

The endpoint doesn't specify what happens if it's used on a channel without ads-manager. I get the output

{
  "data": [
    {
      "snooze_count": 0,
      "snooze_refresh_at": 0,
      "next_ad_at": 0,
      "length_seconds": 0,
      "last_ad_at": 0,
      "preroll_free_time_seconds": 0
    }
  ]
}

i'd expect it to give me a 404 or no data

-- https://github.com/twitchdev/issues/issues/857#issuecomment-1800822567 snooze_refresh_at, next_ad_at and last_ad_at return integers in a real payload

Emilgardis commented 12 months ago

Same issue is present in docs for Snooze Next Ad

Emilgardis commented 12 months ago

and channel.ad_break.begin also exhibits the same behavior in the docs, is_automatic is also a string "false" in the example

Durss commented 12 months ago

Also the dates received do not match the format specified in the documentation. Doc says it's an RFC3339 format (and the json example show "2023-08-01T23:08:18+00:00") but we get a number timestamp in seconds for snooze_refresh_at, next_ad_at and last_ad_at.

Emilgardis commented 10 months ago

The endpoints are now GA, but the issue persists for the examples, the documentation still says they are integers, but example uses strings.

Get Ad Schedule

length_seconds -> duration preroll_free_time_seconds -> preroll_free_time

it also still returns

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

on unaffiliated channels

Ad Break Begin

length_seconds -> duration

Snooze Next Ad

snooze_count