Twitch has one of the worst developer experience I've seen. I developed a set of tools ~6 years ago and they get broken by API changes twice a year. Meanwhile my similar set of Steam tools have been running smoothly for a decade. They just love changing their APIs left and right, often without fully supporting all the previous functionality. They arbitrarily many functions harder on the developer for no reason (like how you now have to manually convert username into userid).
Also, since they switched their own internal API to GraphQL, they basically stopped caring about the developer API. That's the #1 thing, if a website doesn't use the same API that it provides developers, then chances are the API will be shit.
Steam APIs have not significantly changed in the last 15 or so years. They're not exactly well documented, but they are relatively well understood because they haven't changed.
I'd say what they did right is simply not break existing functionality.
Exactly this. It feels like Twitch changes things for the sake of changing them. There is not reason why their changes couldn't have been backward compatible. It's just unnecessary churn for developers, who often are working for free making tools for your website.
TMI[1] is a library that serves a very similar purpose but is still actually relatively maintained (the last commit on the main release branch of twitch.js was back in late 2021 - the main branch has more recent commits but it is not a great sign there has been no releaae since late 2021)
Also TMI seems to better handle the nuances of how twitch uses IRC to provide more useful info. (Twitch uses IRCv3 tags to pass extra info on various messages[2])
> Your page just has to provide some reasonable content with a clear connection to JavaScript! Follow these four steps to get your own free JS.ORG subdomain for your GitHub Page
If people are interested in this, we automatically host Twitch chat apps for you on Autocode and provide a simple, stateless API to work with Twitch chat. We host the chat infra for you, you just write serverless functions to handle webhooks / etc.
Here’s an open source app you can fork (install) immediately that gets you up and running in about a minute;
So yet again another API without any of the features except chat. Sigh. Seriously, these IRC "APIs" barely bring anything to the table. Call it "YATICA" for "Yet Another Twitch IRC Client API" or something like that. Twitch.js suggests an API for Twitch, which this isn't. I am getting super tired of it.
The point is that this isn't a Twitch API as the name suggests. Imagine an API for Microsoft Teams, but all it can do is ... well, chat with people. Your wouldn't call that Teams.js either, would you? At least I hope so ...
This complaint seems a bit arbitrary. Twitch chat is the main interactive component of Twitch. I wouldn't be surprised to see someone build a Discord.js or Slack.js that was only good for chat bots.
It probably handles what 90% of people want to do with such a library.
Clarification: (had been stated publicly before) we speak irc as one protocol option at the edge. We are definitely not running IRC at the edge or infernally.
I'm not sure if they actually use IRC internally, it could just be presenting itself as IRC to have an easy API with tons of libraries offering support. Internally, it could translate IRC calls to whatever their internal architecture wants.
At least a few years ago it was an actual IRC server and has been since justin.tv. I don’t believe they’ve changed it, as irc clients and bots have continued working with no IRC related changes. (I don’t think they’d invest in providing an IRC gateway; it’d be easier to just abandon it)
I can confirm this. Context: part of the engineering team that worked on the chat infrastructure around this time period.
The history is basically:
- v1: IRC API to process scoped servers (Python backend, haxe front end)
- kept API as we migrated backed to go (via a terrible course through nodejs); this version allowed all participants to be in a room together (ie cross process servers).
- once most of background was on go we migrated the front end (can’t remember to what)
- backend then got revved a lot (a specialized team was convened to work on chat infrastructure full time)
It is! AFAIK you can have a bunch of relay servers effectively acting as load balancers. In the nineties / early 00s you had large IRC networks with many thousands of users chatting in real time with no issues.
Well, one known issue was a netsplit [1]. But it did work most of the time.
They do list users and provide joins and parts if you request the IRCv3 CAP. I've never used IRC before (well before my time) outside of implementing some Twitch overlay stuff for a friend though.
Weird to me, there's almost no consumer facing API of note. I just want to mamage my favorite channels and categories, & the web interface is terroble- only shows like 18 results & that's all. There's no api either.
Did note, while poking around, twtich's front end is some pretty wild graphql.
Yep, I only just learned this in this thread. I went looking to see whether they had re-added follow APIs in the new API and found that deprecation notice.
Also, since they switched their own internal API to GraphQL, they basically stopped caring about the developer API. That's the #1 thing, if a website doesn't use the same API that it provides developers, then chances are the API will be shit.