Class: GrubY::User
Instance Attribute Summary
Attributes inherited from BaseObject
#api, #client
Instance Method Summary
collapse
Methods inherited from BaseObject
#[], #dig, field_names, fields, #initialize, #method_missing, #respond_to_missing?, #to_h
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class GrubY::BaseObject
Instance Method Details
#archive ⇒ Object
11
12
13
|
# File 'lib/gruubY/types/user.rb', line 11
def archive
call_raw_api("archiveChats", { chat_ids: [id] })
end
|
#block ⇒ Object
19
20
21
|
# File 'lib/gruubY/types/user.rb', line 19
def block
call_raw_api("blockUser", { user_id: id })
end
|
#get_common_chats(offset_chat_id: 0, limit: 100) ⇒ Object
27
28
29
|
# File 'lib/gruubY/types/user.rb', line 27
def get_common_chats(offset_chat_id: 0, limit: 100)
call_raw_api("getCommonChats", { user_id: id, offset_chat_id: offset_chat_id, limit: limit })
end
|
#unarchive ⇒ Object
15
16
17
|
# File 'lib/gruubY/types/user.rb', line 15
def unarchive
call_raw_api("unarchiveChats", { chat_ids: [id] })
end
|
#unblock ⇒ Object
23
24
25
|
# File 'lib/gruubY/types/user.rb', line 23
def unblock
call_raw_api("unblockUser", { user_id: id })
end
|