7

I can request the favorite questions of a user via the users/{id}/favorites endpoint. If I'm only requesting the favorites for one user, then I know that all of the returned questions are the favorites of that one user.

But if I request the favorites of multiple users (using a vectorized {id}), there's no way to know which of the returned questions "belong" to which user.

I propose adding a new field in the results of the returned question that simply has an array of user ids.

In other words, if I request http://api.stackoverflow.com/1.1/users/115730;75245/favorites, I should get back:

{
 "total": 197,
 "page": 1,
 "pagesize": 30,
 "questions": [
  {
   ...info on the first question...
   "favorited_by": [
    115730
    ]
  },
  {
   ...info on the second question...
   "favorited_by": [
    115730,
    75245
   ]
  },
  {
   ...info on the third question...
   "favorited_by": [
    75245
   ]
  },
  ... etc ...
 ]
}

This favorited_by array would only be present when requesting favorited questions, and it would only contain the (relevant) ids of the users specified in the request.

(Added the tag since I view this as a serious lack of information)

0

You must log in to answer this question.

Browse other questions tagged .