streamlink / streamlink-twitch-gui

A multi platform Twitch.tv browser for Streamlink
https://streamlink.github.io/streamlink-twitch-gui/
MIT License
2.7k stars 204 forks source link

`view_count` data of users/channels has been removed by Twitch #962

Closed bastimeyer closed 1 year ago

bastimeyer commented 1 year ago

The view_count data has just been removed by Twitch and now always returns 0: https://dev.twitch.tv/docs/api/reference/#get-users

Field Type Description
view_count Integer The number of times the user’s channel has been viewed. NOTE: This field has been deprecated (see Get Users API endpoint – “view_count” deprecation). Any data in this field is not valid and should not be used.

Their reasoning here: https://discuss.dev.twitch.tv/t/get-users-api-endpoint-view-count-deprecation/37777

This needs to be removed from the Twitch GUI now. Will do this later today or tomorrow...


curl -s \
  -H 'authorization: Bearer OAUTH_TOKEN' \
  -H 'client-id: phiay4sq36lfv9zu7cbqwz2ndnesfd8' \
  'https://api.twitch.tv/helix/users?id=87056709' \
  | jq .data
[
  {
    "id": "87056709",
    "login": "pgl_dota2",
    "display_name": "PGL_Dota2",
    "type": "",
    "broadcaster_type": "partner",
    "description": "PGL loves DOTA 2.",
    "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/536dd830-6396-40bc-a9f9-643f58dc4a96-profile_image-300x300.png",
    "offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/628a0bc5-574f-4be4-9304-f0f38cb8301d-channel_offline_image-1920x1080.png",
    "view_count": 0,
    "created_at": "2015-03-31T15:02:57Z"
  }
]
bastimeyer commented 1 year ago

218d522...2bf7a549