Take the 2-minute tour ×
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.

Would it be possible to add the accept_rate field to both the user and shallow_user objects?

For example, using the 1.0 API, I can see that Jon Skeet has an accept rate of 95%.

http://api.stackoverflow.com/1.0/users/22656

And unless I'm looking in the wrong place, I can't seem to find it in a similar 2.0 API query.

https://api.stackexchange.com/2.0/users/22656/?site=stackoverflow

share|improve this question
    
That method returns user objects, not shallow_user. But yes accept rate is 'missing' :/ Still not seeing the need for the shallow_user type, filters replace the need for this. –  Jonathan. Jan 31 '12 at 21:14
    
@Jonathan. The reason I specifically mentioned wanting it in the shallow_user object is because question queries (among many others) also include the shallow_user, and my thinking was that it saves another API call to the full user object just to retrieve the accept_rate. And yes, I understand the above query returns a full user object, it was only meant to be an example :) –  Marvin Pinto Jan 31 '12 at 21:19
1  
I might be missing something but accept rate isn't in user either. It seems to have been dropped in 2.0 completely. So you should ask for it in both :) –  Jonathan. Jan 31 '12 at 22:18
add comment

1 Answer 1

up vote 5 down vote accepted

Whelp, that was an oversight.

accept_rate should now be returned on both user and shallow_user. Note that when insufficient data is available to calculate an accept rate, we don't return anything at all.

The exact rules for calculating accept rate are subject to change, but currently documented here. The API returned accept rate should always match the site displayed value, making accommodations for caching on both ends.

share|improve this answer
    
Thanks Kevin. So, do I get [bug] credit for this one :) –  Marvin Pinto Jan 31 '12 at 22:43
add comment

You must log in to answer this question.

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