NicolasSiver / nodebb-plugin-ns-twitch-monitor

Monitors specific channels and adds them to widget view
MIT License
3 stars 5 forks source link

Twitch API: Migrate from v3 to v5 #8

Open NicolasSiver opened 7 years ago

NicolasSiver commented 7 years ago

ACTION REQUIRED: Twitch API Version Update

TL;DR: Read all of this. It’s important and will break your integrations. We’re changing how the Twitch API works and old versions of our API will be deprecated and removed.

Today, we’re delivering a change that you’ve requested for quite some time! Twitch API v5 is available now and uses IDs to reference users instead of usernames. This new API version puts us in a better position to add new functionality and features to both the API and the Twitch website.

You can start using v5 and upgrading your integrations today. You simply pass the application/vnd.twitchtv.v5+json header on your requests. We’re working hard to deliver reference documentation on the affected endpoints by mid-December. Here is a quick example:

Retrieving a user in v3

curl -H 'Client-ID: XXXXX' \
-H 'Accept: application/vnd.twitchtv.v3+json' \
https://api.twitch.tv/kraken/users/dallas

Retrieving a user in v5

curl -H 'Client-ID: XXXXX' \
-H 'Accept: application/vnd.twitchtv.v5+json' \
https://api.twitch.tv/kraken/users/44322889

There are other changes to note with this version:

What does this mean for me as a developer?

You need to migrate your code to use v5. On February 14, 2017, we will be removing v1 and v2 of the API and transition v3 into a deprecated state. In one year (February 14, 2018), v3 will be removed from the API. We hope that this gives enough transition time for your integrations. If your integration relies on username now, you can use the /users endpoint to translate from a username to an ID as shown below.

curl -H 'Client-ID: XXXXX' \
-H 'Accept: application/vnd.twitchtv.v3+json' \
https://api.twitch.tv/kraken/users/dallas

For questions regarding this transition, please ask on the developer forum thread. We know this is a big transition and want to help in any way that we can.

Thank you for being a part of the Twitch Developer community!

GitPuffy commented 4 years ago

Is there any possibility you could update this plugin to work with the changes that Twitch made to their API? Thank you.