Class: Vk::API::Messages
- Inherits:
-
Schema::Namespace
- Object
- Schema::Namespace
- Vk::API::Messages
- Defined in:
- lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/messages/chat.rb,
lib/vk/api/messages/dialog.rb,
lib/vk/api/messages/message.rb,
lib/vk/api/messages/chat_full.rb,
lib/vk/api/messages/methods/get.rb,
lib/vk/api/messages/message_link.rb,
lib/vk/api/messages/methods/send.rb,
lib/vk/api/messages/last_activity.rb,
lib/vk/api/messages/methods/delete.rb,
lib/vk/api/messages/methods/search.rb,
lib/vk/api/messages/longpoll_params.rb,
lib/vk/api/messages/methods/restore.rb,
lib/vk/api/messages/methods/get_chat.rb,
lib/vk/api/messages/methods/edit_chat.rb,
lib/vk/api/messages/methods/get_by_id.rb,
lib/vk/api/messages/chat_push_settings.rb,
lib/vk/api/messages/message_attachment.rb,
lib/vk/api/messages/attachments_history.rb,
lib/vk/api/messages/methods/create_chat.rb,
lib/vk/api/messages/methods/get_dialogs.rb,
lib/vk/api/messages/methods/get_history.rb,
lib/vk/api/messages/user_xtr_invited_by.rb,
lib/vk/api/messages/methods/mark_as_read.rb,
lib/vk/api/messages/methods/set_activity.rb,
lib/vk/api/messages/methods/add_chat_user.rb,
lib/vk/api/messages/methods/delete_dialog.rb,
lib/vk/api/messages/methods/get_chat_users.rb,
lib/vk/api/messages/methods/search_dialogs.rb,
lib/vk/api/messages/methods/set_chat_photo.rb,
lib/vk/api/messages/responses/get_response.rb,
lib/vk/api/messages/responses/send_response.rb,
lib/vk/api/messages/methods/remove_chat_user.rb,
lib/vk/api/messages/methods/delete_chat_photo.rb,
lib/vk/api/messages/methods/get_last_activity.rb,
lib/vk/api/messages/methods/mark_as_important.rb,
lib/vk/api/messages/responses/delete_response.rb,
lib/vk/api/messages/responses/search_response.rb,
lib/vk/api/messages/responses/restore_response.rb,
lib/vk/api/messages/responses/get_chat_response.rb,
lib/vk/api/messages/methods/get_long_poll_server.rb,
lib/vk/api/messages/responses/edit_chat_response.rb,
lib/vk/api/messages/responses/get_by_id_response.rb,
lib/vk/api/messages/methods/get_long_poll_history.rb,
lib/vk/api/messages/responses/create_chat_response.rb,
lib/vk/api/messages/responses/get_dialogs_response.rb,
lib/vk/api/messages/responses/get_history_response.rb,
lib/vk/api/messages/methods/get_history_attachments.rb,
lib/vk/api/messages/responses/mark_as_read_response.rb,
lib/vk/api/messages/responses/set_activity_response.rb,
lib/vk/api/messages/responses/add_chat_user_response.rb,
lib/vk/api/messages/responses/delete_dialog_response.rb,
lib/vk/api/messages/responses/get_chat_users_response.rb,
lib/vk/api/messages/responses/search_dialogs_response.rb,
lib/vk/api/messages/responses/set_chat_photo_response.rb,
lib/vk/api/messages/responses/remove_chat_user_response.rb,
lib/vk/api/messages/responses/delete_chat_photo_response.rb,
lib/vk/api/messages/responses/get_last_activity_response.rb,
lib/vk/api/messages/responses/mark_as_important_response.rb,
lib/vk/api/messages/responses/get_long_poll_server_response.rb,
lib/vk/api/messages/responses/get_long_poll_history_response.rb,
lib/vk/api/messages/responses/get_history_attachments_response.rb
Defined Under Namespace
Modules: Methods, Responses Classes: AttachmentsHistory, Chat, ChatFull, ChatPushSettings, Dialog, LastActivity, LongpollParams, Message, MessageAttachment, MessageLink, UserXtrInvitedBy
Instance Attribute Summary
Attributes inherited from Schema::Namespace
DSL collapse
-
#add_chat_user(arguments = {}) ⇒ Vk::API::Messages::Responses::AddChatUserResponse
Adds a new user to a chat.
-
#create_chat(arguments = {}) ⇒ Vk::API::Messages::Responses::CreateChatResponse
Creates a chat with several participants.
-
#delete(arguments = {}) ⇒ Vk::API::Messages::Responses::DeleteResponse
Deletes one or more messages.
-
#delete_chat_photo(arguments = {}) ⇒ Vk::API::Messages::Responses::DeleteChatPhotoResponse
Deletes a chat's cover picture.
-
#delete_dialog(arguments = {}) ⇒ Vk::API::Messages::Responses::DeleteDialogResponse
Deletes all private messages in a conversation.
-
#edit_chat(arguments = {}) ⇒ Vk::API::Messages::Responses::EditChatResponse
Edits the title of a chat.
-
#get(arguments = {}) ⇒ Vk::API::Messages::Responses::GetResponse
Returns a list of the current user's incoming or outgoing private messages.
-
#get_by_id(arguments = {}) ⇒ Vk::API::Messages::Responses::GetByIdResponse
Returns messages by their IDs.
-
#get_chat(arguments = {}) ⇒ Vk::API::Messages::Responses::GetChatResponse
Returns information about a chat.
-
#get_chat_users(arguments = {}) ⇒ Vk::API::Messages::Responses::GetChatUsersResponse
Returns a list of IDs of users participating in a chat.
-
#get_dialogs(arguments = {}) ⇒ Vk::API::Messages::Responses::GetDialogsResponse
Returns a list of the current user's conversations.
-
#get_history(arguments = {}) ⇒ Vk::API::Messages::Responses::GetHistoryResponse
Returns message history for the specified user or group chat.
-
#get_history_attachments(arguments = {}) ⇒ Vk::API::Messages::Responses::GetHistoryAttachmentsResponse
Returns media files from the dialog or group chat.
-
#get_last_activity(arguments = {}) ⇒ Vk::API::Messages::Responses::GetLastActivityResponse
Returns a user's current status and date of last activity.
-
#get_long_poll_history(arguments = {}) ⇒ Vk::API::Messages::Responses::GetLongPollHistoryResponse
Returns updates in user's private messages.
-
#get_long_poll_server(arguments = {}) ⇒ Vk::API::Messages::Responses::GetLongPollServerResponse
Returns data required for connection to a Long Poll server.
-
#mark_as_important(arguments = {}) ⇒ Vk::API::Messages::Responses::MarkAsImportantResponse
Marks and unmarks messages as important (starred).
-
#mark_as_read(arguments = {}) ⇒ Vk::API::Messages::Responses::MarkAsReadResponse
Marks messages as read.
-
#remove_chat_user(arguments = {}) ⇒ Vk::API::Messages::Responses::RemoveChatUserResponse
Allows the current user to leave a chat or, if the current user started the chat, allows the user to remove another user from the chat.
-
#restore(arguments = {}) ⇒ Vk::API::Messages::Responses::RestoreResponse
Restores a deleted message.
-
#search(arguments = {}) ⇒ Vk::API::Messages::Responses::SearchResponse
Returns a list of the current user's private messages that match search criteria.
-
#search_dialogs(arguments = {}) ⇒ Vk::API::Messages::Responses::SearchDialogsResponse
Returns a list of the current user's conversations that match search criteria.
-
#send(arguments = {}) ⇒ Vk::API::Messages::Responses::SendResponse
Sends a message.
-
#set_activity(arguments = {}) ⇒ Vk::API::Messages::Responses::SetActivityResponse
Changes the status of a user as typing in a conversation.
-
#set_chat_photo(arguments = {}) ⇒ Vk::API::Messages::Responses::SetChatPhotoResponse
Sets a previously-uploaded picture as the cover picture of a chat.
Methods inherited from Schema::Namespace
Constructor Details
This class inherits a constructor from Vk::Schema::Namespace
Instance Method Details
#add_chat_user(arguments = {}) ⇒ Vk::API::Messages::Responses::AddChatUserResponse
Returns Adds a new user to a chat.
4387 4388 4389 4390 4391 4392 4393 |
# File 'lib/vk/api/methods.rb', line 4387 def add_chat_user(arguments = {}) require "vk/api/messages/methods/add_chat_user" method = Methods::AddChatUser.new(arguments) response = method.call(@client) require "vk/api/messages/responses/add_chat_user_response" Responses::AddChatUserResponse.new(response.deep_symbolize_keys) end |
#create_chat(arguments = {}) ⇒ Vk::API::Messages::Responses::CreateChatResponse
Returns Creates a chat with several participants.
4323 4324 4325 4326 4327 4328 4329 |
# File 'lib/vk/api/methods.rb', line 4323 def create_chat(arguments = {}) require "vk/api/messages/methods/create_chat" method = Methods::CreateChat.new(arguments) response = method.call(@client) require "vk/api/messages/responses/create_chat_response" Responses::CreateChatResponse.new(response.deep_symbolize_keys) end |
#delete(arguments = {}) ⇒ Vk::API::Messages::Responses::DeleteResponse
Returns Deletes one or more messages.
4217 4218 4219 4220 4221 4222 4223 |
# File 'lib/vk/api/methods.rb', line 4217 def delete(arguments = {}) require "vk/api/messages/methods/delete" method = Methods::Delete.new(arguments) response = method.call(@client) require "vk/api/messages/responses/delete_response" Responses::DeleteResponse.new(response.deep_symbolize_keys) end |
#delete_chat_photo(arguments = {}) ⇒ Vk::API::Messages::Responses::DeleteChatPhotoResponse
Returns Deletes a chat's cover picture.
4432 4433 4434 4435 4436 4437 4438 |
# File 'lib/vk/api/methods.rb', line 4432 def delete_chat_photo(arguments = {}) require "vk/api/messages/methods/delete_chat_photo" method = Methods::DeleteChatPhoto.new(arguments) response = method.call(@client) require "vk/api/messages/responses/delete_chat_photo_response" Responses::DeleteChatPhotoResponse.new(response.deep_symbolize_keys) end |
#delete_dialog(arguments = {}) ⇒ Vk::API::Messages::Responses::DeleteDialogResponse
Returns Deletes all private messages in a conversation.
4231 4232 4233 4234 4235 4236 4237 |
# File 'lib/vk/api/methods.rb', line 4231 def delete_dialog(arguments = {}) require "vk/api/messages/methods/delete_dialog" method = Methods::DeleteDialog.new(arguments) response = method.call(@client) require "vk/api/messages/responses/delete_dialog_response" Responses::DeleteDialogResponse.new(response.deep_symbolize_keys) end |
#edit_chat(arguments = {}) ⇒ Vk::API::Messages::Responses::EditChatResponse
Returns Edits the title of a chat.
4335 4336 4337 4338 4339 4340 4341 |
# File 'lib/vk/api/methods.rb', line 4335 def edit_chat(arguments = {}) require "vk/api/messages/methods/edit_chat" method = Methods::EditChat.new(arguments) response = method.call(@client) require "vk/api/messages/responses/edit_chat_response" Responses::EditChatResponse.new(response.deep_symbolize_keys) end |
#get(arguments = {}) ⇒ Vk::API::Messages::Responses::GetResponse
Returns a list of the current user's incoming or outgoing private messages.
4110 4111 4112 4113 4114 4115 4116 |
# File 'lib/vk/api/methods.rb', line 4110 def get(arguments = {}) require "vk/api/messages/methods/get" method = Methods::Get.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_response" Responses::GetResponse.new(response.deep_symbolize_keys) end |
#get_by_id(arguments = {}) ⇒ Vk::API::Messages::Responses::GetByIdResponse
Returns messages by their IDs.
4136 4137 4138 4139 4140 4141 4142 |
# File 'lib/vk/api/methods.rb', line 4136 def get_by_id(arguments = {}) require "vk/api/messages/methods/get_by_id" method = Methods::GetById.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_by_id_response" Responses::GetByIdResponse.new(response.deep_symbolize_keys) end |
#get_chat(arguments = {}) ⇒ Vk::API::Messages::Responses::GetChatResponse
Returns information about a chat.
4311 4312 4313 4314 4315 4316 4317 |
# File 'lib/vk/api/methods.rb', line 4311 def get_chat(arguments = {}) require "vk/api/messages/methods/get_chat" method = Methods::GetChat.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_chat_response" Responses::GetChatResponse.new(response.deep_symbolize_keys) end |
#get_chat_users(arguments = {}) ⇒ Vk::API::Messages::Responses::GetChatUsersResponse
Returns a list of IDs of users participating in a chat.
4349 4350 4351 4352 4353 4354 4355 |
# File 'lib/vk/api/methods.rb', line 4349 def get_chat_users(arguments = {}) require "vk/api/messages/methods/get_chat_users" method = Methods::GetChatUsers.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_chat_users_response" Responses::GetChatUsersResponse.new(response.deep_symbolize_keys) end |
#get_dialogs(arguments = {}) ⇒ Vk::API::Messages::Responses::GetDialogsResponse
Returns a list of the current user's conversations.
4125 4126 4127 4128 4129 4130 4131 |
# File 'lib/vk/api/methods.rb', line 4125 def get_dialogs(arguments = {}) require "vk/api/messages/methods/get_dialogs" method = Methods::GetDialogs.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_dialogs_response" Responses::GetDialogsResponse.new(response.deep_symbolize_keys) end |
#get_history(arguments = {}) ⇒ Vk::API::Messages::Responses::GetHistoryResponse
Returns message history for the specified user or group chat.
4166 4167 4168 4169 4170 4171 4172 |
# File 'lib/vk/api/methods.rb', line 4166 def get_history(arguments = {}) require "vk/api/messages/methods/get_history" method = Methods::GetHistory.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_history_response" Responses::GetHistoryResponse.new(response.deep_symbolize_keys) end |
#get_history_attachments(arguments = {}) ⇒ Vk::API::Messages::Responses::GetHistoryAttachmentsResponse
Returns media files from the dialog or group chat.
4182 4183 4184 4185 4186 4187 4188 |
# File 'lib/vk/api/methods.rb', line 4182 def (arguments = {}) require "vk/api/messages/methods/get_history_attachments" method = Methods::GetHistoryAttachments.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_history_attachments_response" Responses::GetHistoryAttachmentsResponse.new(response.deep_symbolize_keys) end |
#get_last_activity(arguments = {}) ⇒ Vk::API::Messages::Responses::GetLastActivityResponse
Returns a user's current status and date of last activity.
4410 4411 4412 4413 4414 4415 4416 |
# File 'lib/vk/api/methods.rb', line 4410 def get_last_activity(arguments = {}) require "vk/api/messages/methods/get_last_activity" method = Methods::GetLastActivity.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_last_activity_response" Responses::GetLastActivityResponse.new(response.deep_symbolize_keys) end |
#get_long_poll_history(arguments = {}) ⇒ Vk::API::Messages::Responses::GetLongPollHistoryResponse
Returns updates in user's private messages.
4297 4298 4299 4300 4301 4302 4303 |
# File 'lib/vk/api/methods.rb', line 4297 def get_long_poll_history(arguments = {}) require "vk/api/messages/methods/get_long_poll_history" method = Methods::GetLongPollHistory.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_long_poll_history_response" Responses::GetLongPollHistoryResponse.new(response.deep_symbolize_keys) end |
#get_long_poll_server(arguments = {}) ⇒ Vk::API::Messages::Responses::GetLongPollServerResponse
Returns data required for connection to a Long Poll server.
4279 4280 4281 4282 4283 4284 4285 |
# File 'lib/vk/api/methods.rb', line 4279 def get_long_poll_server(arguments = {}) require "vk/api/messages/methods/get_long_poll_server" method = Methods::GetLongPollServer.new(arguments) response = method.call(@client) require "vk/api/messages/responses/get_long_poll_server_response" Responses::GetLongPollServerResponse.new(response.deep_symbolize_keys) end |
#mark_as_important(arguments = {}) ⇒ Vk::API::Messages::Responses::MarkAsImportantResponse
Returns Marks and unmarks messages as important (starred).
4267 4268 4269 4270 4271 4272 4273 |
# File 'lib/vk/api/methods.rb', line 4267 def mark_as_important(arguments = {}) require "vk/api/messages/methods/mark_as_important" method = Methods::MarkAsImportant.new(arguments) response = method.call(@client) require "vk/api/messages/responses/mark_as_important_response" Responses::MarkAsImportantResponse.new(response.deep_symbolize_keys) end |
#mark_as_read(arguments = {}) ⇒ Vk::API::Messages::Responses::MarkAsReadResponse
Returns Marks messages as read.
4255 4256 4257 4258 4259 4260 4261 |
# File 'lib/vk/api/methods.rb', line 4255 def mark_as_read(arguments = {}) require "vk/api/messages/methods/mark_as_read" method = Methods::MarkAsRead.new(arguments) response = method.call(@client) require "vk/api/messages/responses/mark_as_read_response" Responses::MarkAsReadResponse.new(response.deep_symbolize_keys) end |
#remove_chat_user(arguments = {}) ⇒ Vk::API::Messages::Responses::RemoveChatUserResponse
Returns Allows the current user to leave a chat or, if the current user started the chat, allows the user to remove another user from the chat.
4399 4400 4401 4402 4403 4404 4405 |
# File 'lib/vk/api/methods.rb', line 4399 def remove_chat_user(arguments = {}) require "vk/api/messages/methods/remove_chat_user" method = Methods::RemoveChatUser.new(arguments) response = method.call(@client) require "vk/api/messages/responses/remove_chat_user_response" Responses::RemoveChatUserResponse.new(response.deep_symbolize_keys) end |
#restore(arguments = {}) ⇒ Vk::API::Messages::Responses::RestoreResponse
Returns Restores a deleted message.
4242 4243 4244 4245 4246 4247 4248 |
# File 'lib/vk/api/methods.rb', line 4242 def restore(arguments = {}) require "vk/api/messages/methods/restore" method = Methods::Restore.new(arguments) response = method.call(@client) require "vk/api/messages/responses/restore_response" Responses::RestoreResponse.new(response.deep_symbolize_keys) end |
#search(arguments = {}) ⇒ Vk::API::Messages::Responses::SearchResponse
Returns a list of the current user's private messages that match search criteria.
4150 4151 4152 4153 4154 4155 4156 |
# File 'lib/vk/api/methods.rb', line 4150 def search(arguments = {}) require "vk/api/messages/methods/search" method = Methods::Search.new(arguments) response = method.call(@client) require "vk/api/messages/responses/search_response" Responses::SearchResponse.new(response.deep_symbolize_keys) end |
#search_dialogs(arguments = {}) ⇒ Vk::API::Messages::Responses::SearchDialogsResponse
Returns a list of the current user's conversations that match search criteria.
4375 4376 4377 4378 4379 4380 4381 |
# File 'lib/vk/api/methods.rb', line 4375 def search_dialogs(arguments = {}) require "vk/api/messages/methods/search_dialogs" method = Methods::SearchDialogs.new(arguments) response = method.call(@client) require "vk/api/messages/responses/search_dialogs_response" Responses::SearchDialogsResponse.new(response.deep_symbolize_keys) end |
#send(arguments = {}) ⇒ Vk::API::Messages::Responses::SendResponse
Returns Sends a message.
4205 4206 4207 4208 4209 4210 4211 |
# File 'lib/vk/api/methods.rb', line 4205 def send(arguments = {}) require "vk/api/messages/methods/send" method = Methods::Send.new(arguments) response = method.call(@client) require "vk/api/messages/responses/send_response" Responses::SendResponse.new(response.deep_symbolize_keys) end |
#set_activity(arguments = {}) ⇒ Vk::API::Messages::Responses::SetActivityResponse
Returns Changes the status of a user as typing in a conversation.
4362 4363 4364 4365 4366 4367 4368 |
# File 'lib/vk/api/methods.rb', line 4362 def set_activity(arguments = {}) require "vk/api/messages/methods/set_activity" method = Methods::SetActivity.new(arguments) response = method.call(@client) require "vk/api/messages/responses/set_activity_response" Responses::SetActivityResponse.new(response.deep_symbolize_keys) end |
#set_chat_photo(arguments = {}) ⇒ Vk::API::Messages::Responses::SetChatPhotoResponse
Returns Sets a previously-uploaded picture as the cover picture of a chat.
4421 4422 4423 4424 4425 4426 4427 |
# File 'lib/vk/api/methods.rb', line 4421 def set_chat_photo(arguments = {}) require "vk/api/messages/methods/set_chat_photo" method = Methods::SetChatPhoto.new(arguments) response = method.call(@client) require "vk/api/messages/responses/set_chat_photo_response" Responses::SetChatPhotoResponse.new(response.deep_symbolize_keys) end |