func (c *Client) CreateUser(i *CreateUserInput) (*User, error) {
	if i.Login == "" {
		return nil, ErrMissingLogin
	}

	if i.Name == "" {
		return nil, ErrMissingName
	}

	resp, err := c.PostForm("/user", i, nil)
	if err != nil {
		return nil, err
	}

	var u *User
	if err := decodeBodyMap(resp.Body, &u); err != nil {
		return nil, err
	}
	return u, nil
}
// CreateUser creates a new API token with the given information.
CreateUser creates a new API token with the given information.
// CreateUser creates a new API token with the given information .
func (c *Client) CreateUser(i *CreateUserInput) (*User, error) {
	if i.Login == "" {
		return nil, ErrMissingLogin
	}
	if i.Name == "" {
		return nil, ErrMissingName
	}
	resp, err := c.PostForm("/user", i, nil)
	if err != nil {
		return nil, err
	}
	var u *User
	if err := decodeBodyMap(resp.Body, &u); err != nil {
		return nil, err
	}
	return u, nil
}
func ( c * Client ) CreateUser ( i * CreateUserInput ) ( * User , error ) { if i . Login == " " { return nil , ErrMissingLogin } if i . Name == " " { return nil , ErrMissingName } resp , err := c . PostForm ( " " , i , nil ) if err != nil { return nil , err } var u * User if err := decodeBodyMap ( resp . Body , & u ) ; err != nil { return nil , err } return u , nil }
CreateUser creates a new API token with the given information.
CreateUser creates a new API token with the given information .