Hot answers tagged

10

As long as has_more is set to true there is more data available. You can get this data by increasing the page parameter in your request subsequently and running new request with that changed page parameter. The next url for your example would then be https://api.stackexchange.com/docs/users#page=2&pagesize=100&order=desc&sort=reputation&...


2

From this link: Gzip and deflate compression in curb http driver You can set curl.encoding = '' to make curb auto decompress response body. Like below: url_so = "http://api.stackoverflow.com/1.0/users/231917?type=jsontext" curl = Curl::Easy.new(url_so) # enables both deflate and gzip compression of responses curl.encoding = '' curl.perform


2

JSON is faster and more compact, so it is easier on the server, and easier to parse in most application languages -- while still being human-readable. Since the API is returning data, rather than markup, JSON is a much better choice than XML. If you insist on XML, there are a great   many   ways   to convert the data yourself, without loading the API ...


2

It is impossible to fetch all of Stack Overflow's users in a single API call, or even in a single day (using just the API and one IP address). There are currently 1,995,355 users on Stack Overflow. Which means that you would need 19,954 API calls to get them all, but your maximum API quota is 10,000 calls per day. The smart thing to do is to have your app ...


2

Thanks to Dave for this ;) Your for loop should be: var i, l; for (i = 0, l = data.items.length; i < l; i++) { // Get your data here }


2

Not that this will solve you're main problem, but that actually isn't part of the API. If you go to api.stackexchange.com you kind information on how to get the data "raw", in JSON format. Sadly however the API doesn't let you get reputation changes for multiple days at once, so you're still stuck with making lots of GET requests. (I'm curious how you ...


Only top voted, non community-wiki answers of a minimum length are eligible