Tag Info

Hot answers tagged

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

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.


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

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

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

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:


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

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

These are two simple methods in meta-language: 1. Pulls a pagesize number of answers, page after page, checking the presence of the given accepted_answer_id def get_accepted_answer_page(question_id, answer_id, sort, pagesize): page = 1 while(True): answers_page_ids = get_answers_ids_with_API_method(question_id, sort, page, pagesize) ...


1

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


1

This has been fixed. Example


1

I believe the sort=votes parameter is for when you are retrieving multiple questions in one API call, such as with this URL - the questions in the response are ordered by vote. http://api.stackoverflow.com/0.8/questions/1429951;2383701;619895?sort=votes&type=jsontext In terms of how you could sort the responses - you do have the up + the down vote ...



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