Its pretty much the topic. Is there a way to get a return from the API to get info boxes or highlights of a specific user? I’m wanting to pull info from my profile for my website, so I only need to edit it in one place.
I haven’t seen anything about the infomation boxes, but the highlights could be found using
Okay, so I’ve gotten this far, but I only want 4 or 5 results, not the whole 10. Adding ?limit=5 kept causing errors, and I tried it in various spots in the URL that I thought would work. Using this GET method, is it possible to limit?
$(document).ready(function() {
$.getJSON('https://api.twitch.tv/kraken/channels/marcusraven86/videos?callback=?', function(data) {
console.log(data);
});
});
This should work https://api.twitch.tv/kraken/channels/marcusraven86/videos?limit=5 But I’m not sure about the callback tho.
Yeah, tried that. Console gives me a “No ‘Access-Control-Allow-Origin’ header” error.
Okay, while writing this, I found something that worked!
https://api.twitch.tv/kraken/channels/marcusraven86/videos?limit=5&callback=?
I needed to do the ? after videos, but & between the limit and the callback. Cool! I thought I tried everything beforehand, but I’m glad I found this. Hope this helps somebody else out there! (BTW, max limit is 100, in case anybody wants to go crazy with it. Lol.)
? lets the server know there are parameters to query, & adds additional parameters to the query.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.