Hot answers tagged

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

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

status-completed person who answered now shown the answer score shown owner reps shown box floats correctly Awesome script. Here is a eventual feature for it that could be useful. Instead of listing answers 'anonymously' you could have the person who answered, their reputation, their upvote count and so on. Also, I have a very wide screen and the ...


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

You have to generate any links back to "proper" SO yourself. The most any of the API methods will give you is (relative) links to other API methods.


3

As of version 2.0 of the API, answers can return a link field in the response, which can be returned in the response by creating a filter that includes it:


3

There is "accepted_answer_id" for questions method. When there is no accepted answers,that field does not exists in returned JSON. So hasAccepted is the existance of "accepted_answer_id" field.


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

This is very costly to do in the API and currently impossible for many combinations of tag and date (because it would require more than the 10,000 allowed API calls per day). I'll write more about that tomorrow (11/11 or 11/12 UTC). Meanwhile, perhaps a SEDE query will work? The query: Top Answerers, by your tags and your date range takes your date range ...


2

This should be fixed now. (Its kind of safe to assume these are bugs by the way, we are in beta)


2

This is [by-design]. /search is already pretty resource intensive, and not returning answers is a conscious effort to reduce its runtime. The answers parameter does not appear in the documentation for /search accordingly.


2

The most straightforward way to get the body is to use the named withbody filter, which you pass in as the value of the filter parameter (example). This will give you all of the default fields, along with the post body. You can also create a custom filter that passes back question.body and answer.body where appropriate along with your select choice of other ...


2

Confirming weirdness with the /users/{id}/answers route. For example, these two queries yield completely different results, although the second one only has a pagesize and page parameters: http://api.stackoverflow.com/1.0/users/180784/answers http://api.stackoverflow.com/1.0/users/180784/answers?pagesize=10&page=1 I would have expected the first 10 ...


2

Hear! Hear! I want to study what makes a good answer on SO. I started by querying complete web pages (questions with all comments, answers, and their comments) for questions with some minimum score (such as 5) for a number of fixed tags A,B,C created in some time period (say, one full week two months ago). This can be done well with \search and a filter ...


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

New feature: if there's a pager displayed (for the reason of 30+ answers), the Quick Nav box gets a mini-pager too: This feature is available as of Quick Nav v2.4


2

bug status-completed When searching questions with a specific tag, the quick navigation button will appear. Here is a screenshot showing the bug.


2

feature-request status-completed (except deletion) The realtime updates are enabled by default .You can opt out of them by clicking "settings" and unchecking "real-time updates". When an answer gets deleted or added, it would be nice if the Quick Navigation box got updated. As well as live update when an answer gets upvoted/downvoted.


2

bug status-completed in case if owner is deleted, using "Answer by deleted user" in case if CW, using "Community Wiki answer" When the user is a community wiki there is no reputation shown. This does make sense since they don't have reputation. Adding an abbreviation of some sort might be helpful, such as "cw". Here is an example of the problem answer ...


2

The API filters are kept pretty simple, and there is no way to restrict these answers to just accepted answers. Your app would loop through the items array and return/handle only those where is_accepted is true. Since you appear to be using PHP, the Stack.PHP library may save you time and effort, overall.


2

The API does not provide a good way for this. Worst case, your app will have to keep a table of every question in the tags of interest. Poll that table and see if the accept status has changed from the last stored answer id, if any. Beware that, depending on what tags you search, and how often you poll, your app may bust its quota. If you don't mind ...


2

First, you'll want to go upvote the feature request to add tag search for answers, etc. (If/when you have the upvote privilege) In the meantime, for answers by tag you can use the /search/excerpts route as long as you include is:answer in the q parameter. For example:       ...


1

The /search/excerpts route looks to be about as good as /search and it does return both questions and answers, and it does have an answers parameter. This route is "★ All new! For version 2.2! ★"


1

To do this you have to use the /users/{ids}/answers path to download all of a user's answers, and then filter out the tags and/or tot-up the scores from there. Pseudo code: scoreByTag = [] // Empty associative array while (more pages of results) { 1) Fetch next page of answers 2) Store results and/or update scoreByTag array } Display/use select ...


1

Okay I figured out that a filter(withbody) needs to be applied here. So the URL would be something like : http://api.stackexchange.com/2.2/questions/5877753/answers?order=desc&sort=activity&filter=withbody&site=stackoverflow


1

last_editor will be missing (empty) from the results when the last editor is a deleted user. This deleted user does not have to be the owner, or original poster, of a given question or answer. For example, see this answer -- which looks like this in the API: { "owner": { "user_id": 362168, "user_type": "registered", "display_name": "Saqueib" ...


1

The method I ended up using in SOUP 1.10 is the first one listed above — loading the full question page and stripping it down to match the review interface. Here's the core of the actual code: var injectAnswers = function ( html ) { // kluge: disable script tags; $.parseHTML() would be better, but needs jQuery 1.8+ var $html = $( ...


1

Its because post id 74 is an answer, not a question. This was an undiscovered bug in the API back when we froze it, but enough [app]s depend on it that we haven't "fixed" it. Naturally, answers have no titles or tags.


1

Hmmm... this is an interesting problem. Just going off of usage statistics, nearly everybody is grabbing answers as part of /questions/{id} or /questions. This strongly suggests that what use of */answers there is, is largely independent of corresponding question (if I had to guess, I'd say its generally user analytics of some sort). However, one of the ...



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