Radioh / ha_twitch_helix

Home Assistant custom component to integrate with Twitch helix api.
MIT License
21 stars 2 forks source link

No followers count #30

Open NicciZar opened 11 months ago

NicciZar commented 11 months ago

Hi,

since the api v3 of twitch there is no followers count for me.

I have not seen anything about a new followers count on twitch api reference guide.

Currently I'm getting this:

image

My issue is, is there anything related / similar to get a followers count?

Radioh commented 10 months ago

Hey @NicciZar - Sorry buddy, but there was a deprecation notice for the API. It was removed in this release: https://github.com/Radioh/ha_twitch_helix/releases/tag/v.1.0.0

There is a new endpoint that can be used, but it requires a user access token, which is a bit more involved than using a ClientId and a ClientSecret. I decided it wasn't worth pursuing for now.

The new API: https://dev.twitch.tv/docs/api/reference/#get-channel-followers

NicciZar commented 10 months ago

Hi @Radioh no worries mate ;)

Would the solution with the access Token hard to implement for you? I'd still love to try it. Since every bot account should be their own respective Twitch Account I am not worried about the API Limit on my main account.

Radioh commented 10 months ago

I'm not sure, I remember looking at it and thought that it wasn't straight forward for the user to get a user token with the right permissions and additional code would need to be implemented to handle and refresh the token.

So I decided to just have the flow with the app access token because it was simpler even though it is now limiting what API endpoints which can be used. 🙂

NicciZar commented 10 months ago

I see. But doesn't twitch offer the same login method as for example microsoft? Youd login to the account via their website (popup) and the key would be created and pasted to the correct spot automatically (which basically is just a rest call) -> oAuth2.0

You could offer to login via the extension (you'd have to secure the login credentials somehow though...)

It would be great to use the extension to its full potential