You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, setting an offset greater than 0 makes the API response lack one item.
This API bug is currently breaking my application, because its infinite scroll mechanism has a fallback for when the _total metadata is/was missing (as it was inconsistent before), and it expects the number of results of the API response to be equal to the requested limit. If fewer records are returned than requested, it treats this as the end of the available records.
I know that this could be implemented differently and another query could be made and then checked if there are no records in the response, but that’s one additional and unnecessary API request, especially considering API rate-limiting on helix once I made the switch. The API bug is also annoying, because my infinite scroll implementation has a calculation for how many records are needed in order to fill the route’s page with just one query, and having one item missing from the API response breaks this as well.
Could you please take a look at this bug? Other endpoints than /streams are also affected by this, eg /games/top (offset=12, limit=12).
The text was updated successfully, but these errors were encountered:
The following report is a copy/paste from this forum post comment: https://discuss.dev.twitch.tv/t/upcoming-changes-to-the-streams-v5-endpoints/23926/10. I am unable to replicate this issue (receiving limits as expected). Including in cause the API team can replicated or confirm this is no longer an issue.
Whatever the reasons for these changes were, you also introduced a bug related to the offset and limit parameters. See this:
offset=0, limit=12
offset=12, limit=12
As you can see, setting an offset greater than 0 makes the API response lack one item.
This API bug is currently breaking my application, because its infinite scroll mechanism has a fallback for when the _total metadata is/was missing (as it was inconsistent before), and it expects the number of results of the API response to be equal to the requested limit. If fewer records are returned than requested, it treats this as the end of the available records.
I know that this could be implemented differently and another query could be made and then checked if there are no records in the response, but that’s one additional and unnecessary API request, especially considering API rate-limiting on helix once I made the switch. The API bug is also annoying, because my infinite scroll implementation has a calculation for how many records are needed in order to fill the route’s page with just one query, and having one item missing from the API response breaks this as well.
Could you please take a look at this bug? Other endpoints than /streams are also affected by this, eg /games/top (offset=12, limit=12).
The text was updated successfully, but these errors were encountered: