Skip to main content

Questions tagged [dev-tip]

A tip for developers working with the Stack Exchange API.

Filter by
Sorted by
Tagged with
12 votes
1 answer
415 views

The /sites method is used to enumerate all sites in the network. If your [app] is meant to run against more than a single site (and many are) this method is how you should be discovering new sites in ...
9 votes
7 answers
4k views

function timeSince(date) { var seconds = Math.floor((new Date() - date) / 1000); var interval = Math.floor(seconds / 31536000); if (interval > 1) { return interval + " years";...
7 votes
0 answers
493 views

While some sort values make inference of the expected min/max values less than ambiguous, others do not. Pending formal documentation, I hope this can serve as an informal reference. Aggregated sort ...
5 votes
2 answers
2k views

Balancing compliance with Request Throttling Limits with maximum allowable throughput in our applications and libraries with any reliability requires self-throttling. This post is meant to be a repo ...
4 votes
8 answers
4k views

UPDATE For JavaScript, see CMS's implementation below. It is much more elegant than the one I provide in the body of this Q. // formats a number similar to the way stack exchange sites // ...
4 votes
0 answers
243 views

RIP August 24, 2010 - April 26, 2013 Due to lack of interest and the increasing burden of maintenance, I have decided to close down this wiki. Most of the information that it contains is either ...
Nathan Osman's user avatar
  • 23.2k
4 votes
0 answers
886 views

In this tip we are going to leverage the SimpleRequestFactory and gather a multipage response. Let's pull the first 5 pages of 100 users on stackapps.com. NOTE: for Silverlight, substitute Newtonsoft....
3 votes
3 answers
208 views

The use case is to generate a list of users ordered by activity, i.e. question_count or answer_count. e.g. total_(questions|answers) display_name [user_id] ------------------------------------------ ...
3 votes
3 answers
295 views

I want to make an application in which the used API will automatically be updated when a newer version is released. What is the procedure to check if a newer version is available or not? How can I ...
3 votes
4 answers
242 views

Since ordering of /sites is not guaranteed, how do i effectively order sites in a user-friendly way? General requirements: Trilogy must stay on the top of the list [stackoverflow.com,meta....
3 votes
2 answers
207 views

The API provides methods to sort and filter individual questions by score. In order to calculate the question score (votes sum) totals per User, some grouping and set operations are required. e.g. ...
3 votes
1 answer
110 views

The use case is to generate a list of bug report submissions, grouped by User, of the following counts in descending order: bug bug + status-completed bug + status-deferred bug + status-bydesign ...