twitchdev / issues

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

Stream_id is "1" for highlights #399

Closed BarryCarlyon closed 1 year ago

BarryCarlyon commented 3 years ago

Brief description

In the Helix Videos api, stream_id is reported as "1" instead of the ID that the highlight is from

How to reproduce

call

https://api.twitch.tv/helix/videos?user_id=26610234&type=highlight&first=100

Expected behavior

Reports the correct source stream ID

Screenshots

image

BarryCarlyon commented 3 years ago

"stream_id": "1",

is also reported for videos of type upload

Xemdo commented 1 year ago

Due to recent changes to the endpoint, this should be resolved. Archives will have stream_id defined, and all others will be set to null

Command to test with:

> twitch api get videos -q user_id=141981764 -q type=<archive/highlight/upload>

"archive" type:

    {
      "created_at": "2023-08-10T18:05:49Z",
      "description": "",
      "duration": "56m18s",
      "id": "1895240623",
      "language": "en",
      "muted_segments": null,
      "published_at": "2023-08-10T18:05:49Z",
      "stream_id": "49068676605",
      "thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/07e02a0e319ba858ac82_twitchdev_49068676605_1691690744//thumb/thumb0-%{width}x%{height}.jpg",
      "title": "Standard Output // August 10, 2023 at 2:00pm EDT",
      "type": "archive",
      "url": "https://www.twitch.tv/videos/1895240623",
      "user_id": "141981764",
      "user_login": "twitchdev",
      "user_name": "TwitchDev",
      "view_count": 615,
      "viewable": "public"
    },

"highlight" type:

    {
      "created_at": "2020-11-17T15:48:32Z",
      "description": "The live coding community takes over to build example Twitch integrations with the Channel Points API.  It's a great opportunity to code along and start building!",
      "duration": "29m44s",
      "id": "806178794",
      "language": "en",
      "muted_segments": null,
      "published_at": "2020-11-17T15:48:32Z",
      "stream_id": null,
      "thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d2nvs31859zcd8/07dc7a138a869874b5ba_twitchdev_44755000598_1843103730//thumb/thumb806178794-%{width}x%{height}.jpg",
      "title": "Twitch Developer Day 2020: Live Coding With CSharpFritz",
      "type": "highlight",
      "url": "https://www.twitch.tv/videos/806178794",
      "user_id": "141981764",
      "user_login": "twitchdev",
      "user_name": "TwitchDev",
      "view_count": 543,
      "viewable": "public"
    },

"upload" type:

    {
      "created_at": "2020-02-14T20:30:12Z",
      "description": "",
      "duration": "49s",
      "id": "551972874",
      "language": "en",
      "muted_segments": null,
      "published_at": "2020-02-14T23:37:43Z",
      "stream_id": null,
      "thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d2nvs31859zcd8/twitchdev/551972874/960d1fd9-536f-4c56-8f1d-50b0be2dd89d/thumb/index-0000000000-%{width}x%{height}.jpg",
      "title": "Timeout with Bits Highlight",
      "type": "upload",
      "url": "https://www.twitch.tv/videos/551972874",
      "user_id": "141981764",
      "user_login": "twitchdev",
      "user_name": "TwitchDev",
      "view_count": 2592,
      "viewable": "public"
    },