Hello,
In my app, I am successfully getting API results for Live Streams, but I currently have three problems:
-
When I make a request without parameters, my
_total
is always different from the length of my streams array. I have at most gotten 10 stream objects when making a call, while the total is always greater. -
When setting a limit, it seems to be disregarded.
-
Setting an offset is also disregarded.
I figure that if I solve the first issue that it might resolve the second two.
Here is my ajax call:
offset = 0
var url = 'https://api.twitch.tv/kraken/search/streams?limit=4&q='
searchInput +'&offset=' + offset;
console.log("url", url)
$.ajax({
type: 'GET',
url: url,
headers: {'Client-ID': 'xxxxxx'},
success: function(data) {
console.log("data", data)
}
searchInput is an input field that I get from the user.
Here is an example of what I am getting back: data > Object {_total: 450, _links: Object, streams: Array(9)}
If you would like to look further into what is going on, I have the app up on Codepen
Any help would be appreciated!