Members API should return same user information as /users/:id

Problem

When listing all members of a group or project, the Members API returns a list of users. Each user's information is similar to the information we return in the Users API, but slightly different.

Members API (GET /groups/:id/members/):

{
    "id": 1,
    "username": "raymond_smith",
    "name": "Raymond Smith",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
    "web_url": "http://192.168.1.8:3000/root",
    "expires_at": "2012-10-22T14:13:35Z",
    "access_level": 30
  },

Users API (GET /users/:id):

{
  "id": 1,
  "username": "john_smith",
  "name": "John Smith",
  "state": "active",
  "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
  "web_url": "http://localhost:3000/john_smith",
  "created_at": "2012-05-23T08:00:58Z",
  "bio": null,
  "location": null,
  "public_email": "john@example.com",
  "skype": "",
  "linkedin": "",
  "twitter": "",
  "website_url": "",
  "organization": ""
}

A group Owner looking to retrieve the public_email for all members of a group must therefore make 2 requests. Instead, we should just consider returning these attributes in the Members API for each returned user.

Proposal

Add public_email, bio, created_at, and other fields returned by the Users API to each returned user in the Members API response when requesting all members of a group or project.

Assignee Loading
Time tracking Loading