Hot answers tagged

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

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


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