Streams/<channel_id> unnecessary nesting in v5?

I was in the middle of converting my twitch bot over from v3 to v5 when I made a made a dumb assumption. In the documentation for v5, I read that _links was removed across the board. When it was time to update my stream/channel_id endpoint wrapper I assumed that since _links was no longer part of the returned JSON blob, that the stream object would no longer be nested. To my ignorance and after a little debug session and actually fully reading the documentation, I realized the stream object was still nested inside the JSON blob. Is there a reason why the returned JSON blob is this, instead of this:

Is there a reaosn why the stream object is still nested when requesting a stream by channel id even when there’s nothing returned in the blob at the same level?

I’d imagine it’d have to be looked at in another way - is there any reason for it to not be nested anymore? I assume for clarity sake (and there was no business reason for Twitch to change it).

If you receive a null json blob, some people might not know whats returning it, but if a null stream object is returned then they know right off the bat where its from. (Really, they should know anyways, it’s their code, but you know…)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.