1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
12 type userWrapper struct {
13 User User `json:"user"`
18 FirstName string `json:"firstname"`
19 LastName string `json:"lastname"`
20 Mail string `json:"mail"`
21 CreatedOn string `json:"created_on"`
22 LastLoginOn string `json:"last_login_on"`
25 func (c *Client) User(id int) (*User, error) {
26 res, err := c.Get("/users/" + strconv.Itoa(id) + ".json")
30 defer res.Body.Close()
32 if res.StatusCode == 404 {
33 return nil, errors.New("Not Found")
37 err = responseHelper(res, &r, 200)