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.

The current behavior of the list version of /badges/{id} is to return the users that have been awarded any of the badges in the list.

An alternative is to have the API to return the list of the users that have been awarded all badges in the list.

I can see how both could be useful. In fact, if I was to write an app to screen for potential SO users to solicit for biz opportunities, I'd like to be able to do both types of queries.

However, the usefulness of the current implementation is bit limited by the fact that determining which badge from the list particular used got, requires additional request.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

The flip-side of that is that an "and" equivalent would require multiple requests to get all of the users who received one of a set of badges.

It just so happens that the "or" behavior was easier - and probably more performant, though don't hold me to that - to implement, and unless there's a compelling reason to change it its going to stay that way.

share|improve this answer
    
"the 'or' behavior was easier" - that's as good a reason as any other I guess... :-) –  Franci Penov Jun 3 '10 at 22:57
add comment

You could make it so that the /badges/{id} list included which badges from the requested list the user has so that the caller is able to do either OR or AND as they wish. Not sure whether that's going to be any harder, of course...

share|improve this answer
add comment

You must log in to answer this question.

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