Tag Info

Hot answers tagged

5

The unofficial Winterbash inbox API If you have any user's account_id then the hats information is just one call away. And the call is http://winterbash2014.stackexchange.com/api/inbox?accountId=<account_id> For example, hats information about me can be retrieved via http://winterbash2014.stackexchange.com/api/inbox?accountId=4996787 But here ...


4

The API documentation states that the API always returns a compressed response: ...we guarantee that all responses are compressed, either with GZIP or DEFLATE. GZIP is the default. This means that you must send the results from wget to gunzip. Like so: wget -O- <URL> | gunzip > results.json Or, in your specific example: wget -O- ...


4

Yes, that bug is annoying, especially since specifying a todate that's before the fromdate returns a valid result set, EG: { "items": [], "has_more": false, "quota_max": 10000, "quota_remaining": 9995 } -- rather than an error. Having the dates be equal is theoretically possible. Having negative time is impossible (in this context). However, ...


3

I don't believe that that route accepts POST requests (as it's non-actionable), so you should have better luck sending a GET request instead. Routes that require auth tokens necessitate HTTPS, but still expect GET for read requests, and POST for writes.


3

Just set pagesize in the URL, like: https://api.stackexchange.com/2.2/tags?pagesize=10&order=desc&sort=popular&site=stackoverflow


3

http://winterbash2014.stackexchange.com/api/user-hats?userId=29538&host=stackapps.com This returns an array of arrays. Each inner array contains three integers: The Id of the hat The number of times the user has earned this hat, all over the network 1 if the user has earned this hat on this particular site (Stack Apps, in this example); 0 otherwise.


3

They are one and the same. When the API was first announced (March 31st, 2010), it was temporarily called the "Stack Overflow API" -- even though Jeff said that the API would be "for all the trilogy sites". Two month's later, when stackapps.com and the public beta were announced, the official name was already Stack Exchange API. There is no separate API ...


3

You cannot use a standard GET request. You must obtain the access_token and then POST the necessary parameters. The steps are currently: Setup: Register your app. Link it with a post here on Stack Apps that has a legitimate [app] or [script] tag. In most cases you will also tag it with placeholder. In your app: Have the user authorize your app and ...


3

Nope. Neither the user_timeline object, nor the user object return any flagging information, at all. (as of API version 2.2). The question, answer, and comment objects can return a can_flag boolean, but this does not necessarily indicate that the user has already flagged, and it returns false for a variety of reasons. Flagging history is especially ...


2

No, the API only allows you to connect to existing Stack Exchange sites, and Stack Exchange no longer sells private sites. Looks like you want one of the clones listed on Meta. Since it's not clear which, if any, of those clones offer an API, there is another approach... If you submit your site through the Area 51 proposal process and it goes to beta, ...


2

No, you cannot do this anymore via the API. API self-documentation was intentionally dropped after API version 1.1. Your only recourse is to scrape the doc pages at api.stackexchange.com/docs.


2

If you just want the total, don't bother paging through the entire full result set. Use the total property of the Common Wrapper Object. This will save lots of time and bandwidth and quota and doesn't require you to loop through the results just to count things. The total property is not enabled by default, so you will need to Create a custom filter for ...


2

It does return all the answers, but they're paged - by default you'll only get 30 at a time. You'll likely want to increase pagesize to 100, and then add the additional code necessary to make subsequent requests if has_more is set on the response wrapper. So, for example, your first request would be like ...


2

There doesn't seem to be a place that describes the policy. That API-object, documentation page would be perfect for it. However, a lead Stack Exchange developer has stated that anything that reveals voting patterns will be hidden or private. Another Stack Exchange employee explains how user deletions and post deletions are kept private-ish, but ...


2

It would be simpler and more precise if you made users provide their ID number instead (for example, yours is 1637442 on Stack Overflow). Then you'd merely use the /users/{ids}/questions route to get the questions. If you really must have access by username, then: First do a search using the inname parameter of the /users route. It is recommended that ...


2

If you query the site list, the markdown_extensions property for each site will contain the list of enabled post-processing extensions, if applicable. Some possible extensions are: Balsamiq MathJax Prettify I believe jTab is also used on the Music site, and there's a Chess extension on the Chess site, but these additions aren't listed in the ...


2

"A number of" might be a bit of a misnomer, as there are a whopping four standard ones: From the filters documentation: default, each type documents which fields are returned under the default filter (for example, answers). withbody, which is default plus the *.body fields none, which is empty total, which includes just .total The page also ...


1

You need to use a filter that returns those properties. The default filter does not. Also, the API is at version 2.2. You should use that unless you've a very good reason not to. So try, for example: http://api.stackexchange.com/2.2/users/55075?site=stackoverflow&filter=!G*ky*lRuarbDJTpnwEtY-a05oz Or: ...


1

Of course as soon as I finally break down and ask a question I see my mistake: Applications that have the client side flow enabled can use https://stackexchange.com/oauth/login_success as their redirect_uri by default. I had "Desktop OAuth Redirect Uri" disabled which the javascript SDK uses. (Note the url posted in the question) Leaving this up here in ...


1

The StackWrap4J library is very obsolete. Its page states: The latest build was tested against version 1.0 of the API on July 28th. But API version 1 has been shut down for quite a while. The API is currently at version 2.2. Choose a different library. The list is at stackapps.com/questions/tagged/library+java. Choose one that supports API version ...


1

I faced the same issue when I was using the stack exchange API to post a message to stack overflow website. I figured I had to post my application on a domain name. I hosted my application on free domain provided by 000webhost.com. You may wish to take a similar approach. After deploying the application on the domain, change the oauth domain and the ...


1

I just finished announcing MetroStack for Windows Phone 8.1. Have a look at it. Metro Stack - A Windows Phone Stack Exchange app


1

There is indeed a way: Just use an appropriate filter with /questions or /search. For example, you can get roughly the JSON equivalent of page How do I get a GreaseMonkey/UserScript to interact with the Live Preview? with this query: https://api.stackexchange.com/2.2/questions/2804?&site=stackapps.com&filter=!BHTP%29W3VIPP%29cNVPt8on92i1%28WJFk1 ...


1

No. You cannot search for a user by email address. Email accounts are sensitive private information and not disclosed by Stack Exchange. You can search for users by display-name though. See the documentation for /users. You can use the inname parameter. For example: /2.2/users?order=desc&sort=reputation&inname=Stack&site=stackoverflow ...


1

As @BrockAdams said, the string is compressed and need to be uncompress depending on the $request->headers. $request = drupal_http_request('https://api.stackexchange.com/2.2/users?order=desc&sort=reputation&site=stackoverflow'); if (isset($request->headers['content-encoding'])) { if ($request->headers['content-encoding'] == 'gzip') { ...


1

Yes, you can use a local environment to develop. For example, this answer contains a complete start to authenticating an HTML+javascript app. All it requires is for you to run XAMPP (or similar server) on your local machine. If you don't need authorization, you can even host your app on one of the free services. For example, this single-web-page app ...


1

See What can I do when getting “We are no longer accepting questions/answers from this account”?. You didn't provide which site you ran the /docs/create-question post on. But, looking at your network profile, I can see that you might well be question-banned on Stack Overflow (Lots of questions with few upvotes and none of them marked answered). It's ...


1

stackoverflow-java-sdk artifacts have been upload to Maven Central. Now, You simply add maven dependency in your project POM Dependency <dependency> <groupId>com.googlecode.stackexchange</groupId> <artifactId>stackoverflow-java-sdk-release</artifactId> <version>2.2.0</version> ...


1

In a nutshell and don't know ask me how to write this in C#: That first "500 error" page is normal. You must display that to the user and the user must approve. When the user approves, the page will redirect to a page (nominally stackexchange.com/oauth/login_success) with the access_token in the URL parameters. For example: ...


1

Or can I just spam them out as fast as my program can send them, as, like you said, you cache it anyway. No. The throttle discussion page specifically says: ... we consider > 30 request/sec per IP to be very abusive and thus cut the requests off very harshly. And even though the underlying data is cached for 60 seconds, the HTML requests are not. ...



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