Sign up ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I know that you could technically loop through the answers returned when you ask for /questions/{id} to see if an answer has been accepted, but it would be AWESOME if there was a top level boolean hasAccepted or something of that nature. How bout it, guys?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
ahhh... i see... it's only there if the answer has been accepted. i kept running tests on questions that hadn't been answered. HA! ok nevermind. although it should be documented that its presence won't be there unless it's been accepted, rather than a -1 or 0 or something. – Jason May 29 '10 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .