Module: DroneCI::UsersAPI

Included in:
API
Defined in:
lib/drone-ci/api/users.rb

Instance Method Summary collapse

Instance Method Details

#users_create(**body) ⇒ Object

Creates a user.

Please note this api requires administrative privileges.

Reference: docs.drone.io/api/users/users_create/



10
11
12
# File 'lib/drone-ci/api/users.rb', line 10

def users_create(**body)
  api.post('users', body)
end

#users_delete(login) ⇒ Object

Deletes a user.

Please note this api requires administrative privileges.

Reference: docs.drone.io/api/users/users_delete/



19
20
21
# File 'lib/drone-ci/api/users.rb', line 19

def users_delete()
  api.delete("users/#{}")
end

#users_info(login) ⇒ Object

Returns information about the named registered user.

Please note this api requires administrative privileges.

Reference: docs.drone.io/api/users/users_info/



28
29
30
# File 'lib/drone-ci/api/users.rb', line 28

def users_info()
  api.get("users/#{}")
end

#users_listObject

Returns a list of all registered users.

Please note this api requires administrative privileges.

Reference: docs.drone.io/api/users/users_list/



37
38
39
# File 'lib/drone-ci/api/users.rb', line 37

def users_list
  api.get('users')
end

#users_update(login, **body) ⇒ Object

Updates the specified user.

Please note this api requires administrative privileges.

Reference: docs.drone.io/api/users/users_update/



46
47
48
# File 'lib/drone-ci/api/users.rb', line 46

def users_update(, **body)
  api.patch("users/#{}", body)
end