Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
108 views

How to check if a given question is changed

What is the fastest way to check if a question is changed using the API calls? For my purpose (a cache), a question is considered changed if: A new comment is added to the question or to any of its ...
3
votes
0answers
155 views

Announcement: StackExchange API Development Wiki

Further Update: Due to an excessive amount of spam (just look at the recent changes page if you don't believe me), I have now disabled anonymous editing and username / password registration. ...
2
votes
1answer
94 views

How to retrieve notifications for a given user.

There seems to be a few of these "dev-tips" so I'll share a problem I have. To notify a user of comments directed to them, we use the users/{id}/mentioned method. However, notifying a user of ...
1
vote
1answer
87 views

How to generate a list of users ranked by bug report submissions.

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 ...
2
votes
3answers
116 views

How to generate a list of users ranked by activity (question or answer count).

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] ...
2
votes
3answers
156 views

How to calculate a list of users ranked by question favorite count totals.

The API provides methods to sort and filter individual questions by favorite count. In order to calculate the question favorite count totals per User, some grouping and set operations are required. ...
2
votes
2answers
113 views

How to calculate a list of users ranked by question score (votes sum) totals.

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. ...
2
votes
2answers
78 views

How to calculate a list of users ranked by question view count totals.

The API provides methods to sort and filter individual questions by view count. In order to calculate the question view count totals per User, some grouping and set operations are required. e.g. ...
2
votes
3answers
151 views

How to monitor api version and site state

I want to make an application in which API used will be automatically updated when newer version will be released. What is the procedure to check if newer version is available or not? And also please ...
3
votes
0answers
62 views

recommended buffer size for markdown fields is conservative

I ran into a truncation error while inserting user data into a database using the documented field length (buffer size) of 3000. So I redefined to nvarchar(max), pulled all users in the stack ...
3
votes
2answers
354 views

API compliant request throttle implementations

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 ...
0
votes
0answers
38 views

api domain object unique keys

For those who wish to maintain object graphs or to persist api domain objects authoritative documentation of the field(s) that define a unique key for the object would be of value. Some are obvious ...
7
votes
1answer
216 views

How the /sites method is meant to be used

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 ...
4
votes
2answers
128 views

Simple Activity Monitor - For Educational Purposes only.

This Soapi.JS script, if abused is likely to provoke frowns from those whom you would like to see smiles. Note: the dataset is only valid if the entire user base is pulled, and on just about any ...
2
votes
4answers
120 views

How to order /sites result in a user friendly way to use it in our apps.

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 ...
8
votes
3answers
154 views

Should we adjust the format of the dev-tip questions early on?

Update: I've 'averaged' the few answers and comments and included the respective result below each question (all results are executed accordingly for some time already in most dev-tip posts). The ...
3
votes
3answers
242 views

How to format an url-friendly slug for question urls

I would like to construct a slug starting from the question title. It would be useful to apps that want to show the original link to the question in a human readable way. On StackPrinter i have this ...
2
votes
8answers
382 views

How to format reputation numbers similar to Stack Exchange sites.

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 ...
7
votes
7answers
626 views

How to format time since xxx e.g. “4 minutes ago” similar to Stack Exchange sites

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

How to get the count of a query efficiently

To get the count of a query without returning results, simply specify pagesize=0. http://api.stackoverflow.com/0.9/users?filter=mike&sort=name&pagesize=0 { "total": 1161, "page": 1, ...
4
votes
0answers
248 views

How to use min/max with sort

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 ...
2
votes
0answers
210 views

How to retrieve paged API results in C# and Silverlight

In this tip we are going to leverage the SimpleRequestFactory and gather a multipage response. Lets pull the first 5 pages of 100 users on stackapps.com. NOTE: for Silverlight, substitute ...
2
votes
0answers
1k views

How to call the API via JSONP in Plain Old JavaScript

This tips demonstrates how to call the API in JavaScript without the need of jQuery or other frameworks. In a lot of cases you will find that the JSONP implementations provided in various frameworks ...
3
votes
0answers
463 views

Dev-Tip: How to call the API in C# and Silverlight

This tip shows a simple and reliable way to create HttpWebRequest that are configured to properly query the api. With the exception of the AutomaticDecompression assignment, this code can be used in ...