Tag Info

Hot answers tagged

6

You need to pass in a sufficiently large pagesize value, per the documentation: The pagesize parameter for this method is unbounded, in acknowledgement that for many applications repeatedly fetching from /sites would complicate start-up tasks needlessly. Otherwise you'll only get 30 results, the default value for pagesize. Alternatively, you can page ...


6

You don't explicitly need permission, but you must follow certain rules and legal requirements. Refer to Jeff Atwood ♦'s answer to "Etiquette of Screen-scraping Stack Overflow?": We regularly block (IP range ban) unknown scrapers that do not identify themselves and/or have poor behavior patterns. These bans are permanent until someone emails us to make ...


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 ...


5

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.


5

It's pretty easy to get the bibtex, just send a GET request formatted like so: http://mathoverflow.net/posts/{POST NUMBER}/citation For example, for this Math Overflow question, you can get the bibtex for the question and top 2 answers with: mathoverflow.net/posts/105922/citation (Question) mathoverflow.net/posts/105930/citation (Answer 1) ...


5

template.user.js // ==UserScript== // @name Stack Exchange Userscript (Template) // @grant none // @match *://*.stackexchange.com/* // @match *://*.stackoverflow.com/* // @match *://*.superuser.com/* // @match *://*.serverfault.com/* // @match *://*.askubuntu.com/* // @match *://*.stackapps.com/* // @match *://*.mathoverflow.net/* // ==/UserScript== var ...


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

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


4

There's no one way. Here's a recipe you can use: Make a proper app post here on StackApps. See How to list your application/library/wrapper/script here. Look for posts on Meta Stack Overflow (MSO) and/or on Meta Stack Exchange (MSE) where your app might make part of a good answer. If you find such posts, make proper answer(s) to them -- linking both to the ...


4

I've made a userscript to do this. Update: This has been added to the dev version of my SE Additional Optional Features userscript - please install that instead of this. Any updates will go straight to that userscript, not this! Get it at Github. It gets the latest 5 questions posted on the per-site meta of the current site and adds a diamond to the ...


4

The API does not provide any method to determine a user's email address and it is unlikely to do so in the future. This would be a risk to both the user's privacy and his/her trust in Stack Exchange. And, a pressing need for this information has yet to be demonstrated, regarding the API. Note that Stack Exchange refuses to even provide the user's email hash ...


4

items is documented in the Common Wrapper Object. It is an array of whichever object the given route returns. In the case of /me/associated,  items is an array of network_user objects. If you use a filter that returns .wrapper.type, then type will return the type that items has assumed. EG: { "items": [ // <=== Linked ...


4

See the documentation for network_user.   top_answers and top_questions are not returned by default; you must specify them explicitly in a filter. When you ran /me/associated from the doc page and from your app, you used a filter (!-*f(6r3ZbZjn) that specified those two properties. When you used the address bar of the browser, you didn't specify a ...


4

There's no real expectation set for this, feel free to pick whichever option seems better to you. I personally feel the tag is sufficient, but I could see how having it in the title might save some people some disappointment. My hope is that people will just finish their app and it won't matter much either way, so I'm not particularly concerned.


4

The routes that don't link require POST requests because they create context, so there's nothing meaningful to be gained by going to those URLs in your browser. The rest of the routes return data when you send GET requests to them, which is why the link is useful in that case.


4

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 ...


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

Okay, went ahead and banged out a script for this; Happy Christmas! To install, click here (SE Edit Reasoner install at Github). To preview the source, click here (SE Edit Reasoner preview at Github). This userscript requires an engine that supports both @require and the various @granted APIs. It was tested on Firefox + Greasemonkey and Chrome + ...


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

See "How do comment @replies work?" and "@Peter works for Péter Török?". Comment replies will often work with unicode. EG: Péter Török can be reached by both @Peter and @Péter. These are the documented rules (Not checked against latest source) for converting user display_name to comment-reply @names: Remove any spaces. Single quotes, dots, dashes and ...


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

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 ...


3

"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 ...


3

I forgot to add the scope in the authentication url according to this document https://api.stackexchange.com/docs/authentication#scope 1.Send a user to https://stackexchange.com/oauth, with these query string parameters ◦client_id ◦scope (details) ◦redirect_uri - must be under an apps registered domain ◦state - optional


3

This is a classic "procedural" (or "row based" or "sequential") versus "set based" issue. See Understanding “Set based” and “Procedural” approaches in SQL or any one of thousands of similar articles. The API uses SQL to get its results and the idea of requiring an arbitrary order to results is anathema in SQL -- a sign of possible deficiencies in "set ...


3

If the answer is the accepted answer, is_accepted is true and anyone can see it. accepted is set to true only if the currently authenticated user is the one who has accepted the answer. For instance, if I obtain an access_token with the private_info privilege and call: /2.2/questions/30028657/answers?site=stackoverflow&key={YOUR APP ...


3

I've made a userscript to do this. Get it at Github. It will add a button next to comments that belong to you after you have posted them (so not as you're writing). Clicking it will produce a prompt asking you for the number of days in which to delete the comment. Eg. entering 2 will delete it in exactly 2 days. It checks every o'clock for times that ...


3

The \r\n issue was solved when I changed to a POST request. But, since I was retagging questions (didn't really need to change the body, just resend it), I ended up using the body_markdown, encoded with HTMLParser.HTMLParser().unescape() body_markdown = str(HTMLParser.HTMLParser().unescape(question_data['items'][0]['body_markdown'])) And then sending ...


3

It sounds like you've either got a bug which is in fact making more requests than you think it is, or you're on a network where there's some other source of high-frequency requests. You're not supposed to have to deal with this situation in general, because this isn't an API error - it's an error from the load balancer because your IP is generating incoming ...


3

You cannot do this. A delete feature has been requested and requested again (with status-planned given about 3.5 years ago). Register your desire for this by immediately upvoting these posts: Deleting an application key? How to delete an OAuth (2.0) API key? (Theoretically, if those feature requests get enough upvotes, they might get some developer ...



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