| Module | Gitlab::Client::Users |
| In: |
lib/gitlab/client/users.rb
|
Defines methods related to users. @see github.com/gitlabhq/gitlabhq/blob/master/doc/api/users.md @see github.com/gitlabhq/gitlabhq/blob/master/doc/api/session.md
Creates a new SSH key.
@example
Gitlab.create_ssh_key('key title', 'key body')
@param [String] title The title of an SSH key. @param [String] key The SSH key body. @return [Gitlab::ObjectifiedHash] Information about created SSH key.
Creates a new user. Requires authentication from an admin account.
@example
Gitlab.create_user('joe@foo.org', 'secret', 'joe', { name: 'Joe Smith' })
or
Gitlab.create_user('joe@foo.org', 'secret')
@param [String] email The email of a user. @param [String] password The password of a user. @param [String] username The username of a user. @param [Hash] options A customizable set of options. @option options [String] :name The name of a user. Defaults to email. @option options [String] :skype The skype of a user. @option options [String] :linkedin The linkedin of a user. @option options [String] :twitter The twitter of a user. @option options [Integer] :projects_limit The limit of projects for a user. @return [Gitlab::ObjectifiedHash] Information about created user.
Deletes an SSH key.
@example
Gitlab.delete_ssh_key(1)
@param [Integer] id The ID of a user‘s SSH key. @return [Gitlab::ObjectifiedHash] Information about deleted SSH key.
Deletes a user.
@example
Gitlab.delete_user(1)
@param [Integer] id The ID of a user. @return [Gitlab::ObjectifiedHash] Information about deleted user.
Updates a user.
@example
Gitlab.edit_user(15, { email: 'joe.smith@foo.org', projects_limit: 20 })
@param [Integer] id The ID of a user. @param [Hash] options A customizable set of options. @option options [String] :email The email of a user. @option options [String] :password The password of a user. @option options [String] :name The name of a user. Defaults to email. @option options [String] :skype The skype of a user. @option options [String] :linkedin The linkedin of a user. @option options [String] :twitter The twitter of a user. @option options [Integer] :projects_limit The limit of projects for a user. @return [Gitlab::ObjectifiedHash] Information about created user.
Get a single email.
@example
Gitlab.email(3)
@param [Integer] id The ID of a email. @return [Gitlab::ObjectifiedHash]
Gets information about SSH key.
@example
Gitlab.ssh_key(1)
@param [Integer] id The ID of a user‘s SSH key. @return [Gitlab::ObjectifiedHash]
Gets a list of user‘s SSH keys.
@example
Gitlab.ssh_keys
@param [Hash] options A customizable set of options. @option options [Integer] :page The page number. @option options [Integer] :per_page The number of results per page. @return [Array<Gitlab::ObjectifiedHash>]
Gets information about a user. Will return information about an authorized user if no ID passed.
@example
Gitlab.user Gitlab.user(2)
@param [Integer] id The ID of a user. @return [Gitlab::ObjectifiedHash]
Search for groups by name
@example
Gitlab.user_search('gitlab')
@param [String] search A string to search for in user names and paths. @param [Hash] options A customizable set of options. @option options [String] :per_page Number of user to return per page @option options [String] :page The page to retrieve @return [Array<Gitlab::ObjectifiedHash>]
Gets a list of users.
@example
Gitlab.users
@param [Hash] options A customizable set of options. @option options [Integer] :page The page number. @option options [Integer] :per_page The number of results per page. @return [Array<Gitlab::ObjectifiedHash>]