Weirdness with Extension Activated

to follow up "Get Live Channels with Extension Activated" returning channels without extension activated

Page 1 contains 2 items.

I cursor and get another 3 items

Should all 5 items be on page 1?

That oddness is due to the way the endpoint is working internally – we’re actually merging two different lists of data, one of which is internally paged at constant size. Each request is looking at all channel installs for the requested extension, and then filtering by the listing of live channels. The strategy could potentially mean 0 returns and a pointer to another page, which I realize is irritating.

This particular endpoint has been a pain point since launch for us; we have chosen to use the current page-then-filter method because it allows a predictable load and return time on the underlying data for each call. There is much room for improvement; our first priority has been making the system stable for both ourselves and developers. I think we’re almost at that goal with some additional changes planned to go out soon.

I can’t speak to our roadmap, and I don’t know where refactoring the service for a better data strategy would fit on a calendar, but making this call significantly more efficient and paging the public response only when necessary are both things I would like to do.

So, logically

I get page one with 2 people
Page two with 3 people
Page three with zero people
Page four with a number of people.
And so on…

So how do I know to stop cursoring?

A test just now, seems that I keep cursoring till the cursor is no more?

Each response has a next_page_token to feed to the next iteration; when you hit the end of the list, the token will be absent.

EDIT : yep – I think you edited the second question in while I was posting, but that’s the correct thing to do.

Sounds good. It’s cursor for this endpoint though :smiley:

Doh – sorry, I think that’s probably translation between the internal service and the api edge :smiley:




All good!

From the TwitchDev TwitchApp server:

Pease accept this motivational poster