Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A tip for developers working with the Stack Exchange API.
4
votes
How to format reputation numbers similar to Stack Exchange sites
c#
Rounds up - same same SO.
public string FormatReputation(int value)
{
var rep = System.Convert.ToDouble(value);
if (rep < 10000)
{
return rep.ToString("N0");
}
…
3
votes
Accepted
How to format an url-friendly slug for question urls
the 'slug' is a cleaned title hyphen delimited and truncated to some length which is easily discoverable by measuring a few 'slugs' that are obviously truncated.
and in reality, you can place any th …
3
votes
Should we adjust the format of the dev-tip questions early on?
As I said, I like it. As usual, Steffen presents a well considered opinion and one that I agree with.
The dev-tip is just something I started doing without much thought except 'hey, for those trying …
2
votes
API compliant request throttle implementations
C# sliding window throttle implementation
This is the throttle implementation used by Soapi.CS. It is compatible with all .net platforms (desktop/silverlight/phone/mono)
It has proven to provide max …
2
votes
How to format time since xxx e.g. "4 minutes ago" similar to Stack Exchange sites
C# and Javascript port of Bill's answer
Works for me - adding it to both Soapi libraries. See the JS version in action here
One thing to keep in mind is that dates coming from the API are UTC. In ord …
2
votes
Accepted
How to monitor API version and site state
For future reference: API Documentation and Help
To answer your question:
To discover sites that are available in the Stack Exchange network, monitor http://stackauth.com/1.0/sites (http://stackauth.c …
2
votes
How to calculate a list of users ranked by question favorite count totals.
C# / Soapi.CS
using Soapi.CS
//
Context
.Official
.StackApps
.Questions
.PageCount(0)
.PageSize(100)
.GroupBy(question => question.OwnerId)
.Select(group => new
{
…
2
votes
How to generate a list of users ranked by activity (question or answer count).
C# / Soapi.CS
using Soapi.CS
Questions
(from user in Context.Official.StackApps
.Users.PageSize(100).PageCount(0)
where user.QuestionCount > 0
orderby user.QuestionCount descending
select us …
2
votes
How to calculate a list of users ranked by question favorite count totals.
JavaSript / Soapi.JS
using Soapi.JS
Soapi.RouteFactory("api.stackapps.com", apiKey) // get all users
.Questions({ pagesize: 100 }).getPagedResponse(function(data) {
var values = {}, keys = [];
…
2
votes
How to generate a list of users ranked by activity (question or answer count).
JavaSript / Soapi.JS
using Soapi.JS
Questions
Soapi.RouteFactory("api.stackapps.com", apiKey) // get all users
.Users({ pagesize: 100 }).getPagedResponse(function(data) {
var output = "";
d …
2
votes
How to monitor API version and site state
C# / Soapi.CS
using Soapi.CS
//
[Test]
public void SiteMonitor()
{
Context.Options.LazyLoadingEnabled(true);
Context.Sites.ForEach(site=>
Console.WriteLine("{0} {1} {2} {3}",
…
2
votes
How to order /sites result in a user friendly way to use it in our apps.
[thinking out loud]
Well, the sites we want to pin should be a constant and, as you describe, are.
I would have 3 arrays, head, body and tail.
I would statically populate head and tail with the 'p …
2
votes
Accepted
How to check if a given question is changed
I have been working on another API recently so I may be a bit dull but my first impression is that the path of least resistance is to
pull your question(s) with answers and comments disregarding ac …
2
votes
Accepted
How to order /sites result in a user friendly way to use it in our apps.
Here is my take on kevin's sort using Soapi.JS
get a list of sites from stackauth /sites
get the community user from each site to get creation date
attach each meta to it's parent
sort by date
group …
2
votes
How to monitor API version and site state
JavaSript / Soapi.JS (V2)
Using Soapi.JS (V2)
Yes, this is a teaser - v2 will be released before the weekend.
var apiKey = "my-foo-bar-fu-is-strong";
var ctx = new Soapi.ApiContext(apiKey);
ctx.init …