APIFormat returns the API format of a user.
()
| 1298 | |
| 1299 | // APIFormat returns the API format of a user. |
| 1300 | func (u *User) APIFormat() *api.User { |
| 1301 | return &api.User{ |
| 1302 | ID: u.ID, |
| 1303 | UserName: u.Name, |
| 1304 | Login: u.Name, |
| 1305 | FullName: u.FullName, |
| 1306 | Email: u.Email, |
| 1307 | AvatarUrl: u.AvatarURL(), |
| 1308 | } |
| 1309 | } |
| 1310 | |
| 1311 | // maxNumRepos returns the maximum number of repositories that the user can have |
| 1312 | // direct ownership. |