I am trying to achieve the following with Javascript:
Given a reddit username , I want to retrieve the maximum amount of comments allowed for this user.
So far what i have managed to do is retrieve only the 25 latest comments which is the default reddit behaviour. Typing in the browser for example the following url, we receive 25 comments in the json response.
"https://www.reddit.com/user/spez/.json"
We can limit or extend the number of comments from a user ( name of user is spez in the example) as follows:
"https://www.reddit.com/user/spez/.json?limit=1000"
However how could I also use limit with the following ?
$.getJSON(
"http://www.reddit.com/u/"+ user + "/.json?jsonp=?",function foo(result) {
$.each(result.data.children.slice(0, 10),
function (i, post) {
$("#reddit-content").append( '<br>' + post.data.body );
$("#reddit-content").append( '<hr>' );
});
}
)