Module: ZQuickblox::User
- Defined in:
- lib/zquickblox/user.rb,
lib/zquickblox/user/find_user_request.rb,
lib/zquickblox/user/login_user_request.rb,
lib/zquickblox/user/create_user_request.rb,
lib/zquickblox/user/delete_user_request.rb
Defined Under Namespace
Classes: CreateUserRequest, DeleteUserRequest, FindUserRequest, LoginUserRequest, User
Class Method Summary
collapse
Class Method Details
.delete(login, password, id) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/zquickblox/user.rb', line 25
def delete(login, password, id)
request = ZQuickblox::User::DeleteUserRequest.new(id)
run_request(request, login, password)
return nil if request.response.status != 200
return {}
end
|
.run_request(request, login = nil, password = nil) ⇒ Object
32
33
34
35
36
|
# File 'lib/zquickblox/user.rb', line 32
def run_request(request, login=nil, password=nil)
session = ZQuickblox::Session.create(login, password)
request.("QB-Token", session.token)
request.execute
end
|