Hot answers tagged

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

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

No, the WebSockets are not officially supported. They are internal to Stack Exchange, use them at your own risk. If it is at all possible to do your task with the API, use that. That's what it's there for. Some people have sussed out some of the endpoints. You can see them in the answers to: How do the Stack Exchange WebSockets work? What are all the ...


5

Refer to the Stack Exchange API, Authentication docs. It looks like you are trying to authenticate using either a server you do not control, or a local server that is not on the public internet. Crucial Points: Do not specify a redirect_uri to any server that you do not control!!! When you use something like redirect_uri=https://www.yahoo.com/, then a ...


5

This doesn't have anything to do with Stack Exchange pages, it's a browser thing and mostly a very good thing. You can see that the page isn't doing it by: Disable all javascript on your browser. (Re)load an appropriate Stack Exchange page (or any long page with a <textarea>). Focus the textarea for keyboard input but use the mouse to scroll it out ...


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

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


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

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


4

Your second call must be https:. You actually got an error like: "error_id":406, "error_message":"Access token sent over non-HTTPS request, it has been invalidated", "error_name":"access_token_compromised" On the first attempt. Only subsequent attempts, with the same token, would yield the 'key' is not valid for passed 'access_token' error. When ...


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

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

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

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

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

The various /questions routes do allow you to simultaneously retrieve answers, if you set the right filter. A good starting filter for getting questions with answers is: !gB7hjL3lhJ*Cnfe63rh6pAm74J(5qrOZKbL To Customize a Filter: Go to the /questions documentation page. Scroll to the Filter Edit Tool: Click on the tool and this dropdown appears: ...


4

Your stated problem is considerably easier than the question you linked. You can use the /users/{ids}/answers route to get what you want -- with a little work. The trick is to use a filter that returns the answers.tags property. In your case, if you really just want totals, and for one user at a time, you can use the filter: !GeF-5u(cSumXA . The ...


4

You can use /users/{ids}/associated Try it for your network account Returns all of a user's associated accounts, given their account_ids in {ids}. {ids} can contain up to 100 semicolon delimited ids, to find ids programatically look for account_id on user objects. You can filter the network_users returned by this method with the types ...


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

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

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

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

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

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


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

There really is no particularly satisfactory way to do this since all versions of last_activity_date conflate a question's activity with the activity of its answers. You are going to have to fetch lots of items and filter out the chaff yourself. There are 2 main routes you can take, events or questions: A) Use the /events route: Use a filter that ...


3

An inbox message body is not the same as a post body. Inbox messages are truncated by design. Here's a snippet of my inbox: Notice how the "body" is truncated at 100 characters? (Counting the ... and accounting for HTML entities like &#39;.) The results I get from /2.2/me/inbox?filter=!SmOhH2b13NujlyyXX6 are exactly the same: "body": "Very ...


3

Notice that the route used has /top-answerers/. The doc page states: Returns the top 30 answer​ers active in a single tag, of either all-time or the last 30 days. (Emphasis added) So, that route is returning what it should. If you really want the top answers for a tag, use the /search/excerpts route and set: sort=votes order=desc ...


3

It's a bit confusing but that is not a bug. Think of it as, "Reputation change from when to when?" Since you specified neither a fromdate, nor a todate, you are effectively asking for the changes for all time. If you run the query for Nov 1, 2015 to Nov 9, 2015:           ...



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