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.

I can't understand why badges/{ids}/recipients returns badges and not users? You must pass the badge ID in, so it should be given that you already know what the badge is. If it returns 30 objects you get 30 copies of the badge data. That doesn't sound very efficient, especially given that a lot of changes in v2.0 have been about making things more efficient.

Surely it would be better just to return user objects? If a copy of the badge must be returned then add a field called "context" as a sibling (at the same level) as "items"?

share|improve this question
add comment

1 Answer 1

Remember the existence of /badges/recipients, which does not take any badge ids. For that method, simply returning users would be essentially useless; /badges/{ids}/recipients returns the same type in-keeping with the /something/{ids}/tail pattern.

Also note that if you pass multiple badge ids you need the badge data to distinguish who earned which badge in the returns.

Filters allow you to turn the */recipients methods into "just users" methods: users who recently received Teacher on Stack Overflow for example.

share|improve this answer
    
Oh right I didn't remember that one. Why not make badge.user, into badge.users? That way only one copy of each badge is returned? –  Jonathan. Jan 21 '12 at 19:29
add comment

You must log in to answer this question.

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