Class: Vk::API::Messages::Methods::Get

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/messages/methods/get.rb

Overview

Returns a list of the current user's incoming or outgoing private messages.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Messages::Methods::Get

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :out (Boolean)

    '1' — to return outgoing messages; '0' — to return incoming messages (default)

  • :offset (Integer)

    Offset needed to return a specific subset of messages.

  • :count (Integer)

    Number of messages to return.

  • :time_offset (Integer)

    Maximum time since a message was sent, in seconds. To return messages without a time limitation, set as '0'.

  • :preview_length (Integer)

    Number of characters after which to truncate a previewed message. To preview the full message, specify '0'.; "NOTE: Messages are not truncated by default. Messages are truncated by words."

  • :last_message_id (Integer)

    ID of the message received before the message that will be returned last (provided that no more than 'count' messages were received before it; otherwise 'offset' parameter shall be used).



# File 'lib/vk/api/messages/methods/get.rb', line 15

Instance Method Details

#countInteger

Returns Number of messages to return.

Returns:

  • (Integer)

    Number of messages to return.



32
# File 'lib/vk/api/messages/methods/get.rb', line 32

attribute :count, API::Types::Coercible::Int.optional.default(20)

#last_message_idInteger

Returns ID of the message received before the message that will be returned last (provided that no more than 'count' messages were received before it; otherwise 'offset' parameter shall be used).

Returns:

  • (Integer)

    ID of the message received before the message that will be returned last (provided that no more than 'count' messages were received before it; otherwise 'offset' parameter shall be used).



38
# File 'lib/vk/api/messages/methods/get.rb', line 38

attribute :last_message_id, API::Types::Coercible::Int.optional.default(nil)

#offsetInteger

Returns Offset needed to return a specific subset of messages.

Returns:

  • (Integer)

    Offset needed to return a specific subset of messages.



30
# File 'lib/vk/api/messages/methods/get.rb', line 30

attribute :offset, API::Types::Coercible::Int.optional.default(nil)

#outBoolean

Returns '1' — to return outgoing messages; '0' — to return incoming messages (default).

Returns:

  • (Boolean)

    '1' — to return outgoing messages; '0' — to return incoming messages (default)



28
# File 'lib/vk/api/messages/methods/get.rb', line 28

attribute :out, API::Types::Form::Bool.optional.default(nil)

#preview_lengthInteger

Returns Number of characters after which to truncate a previewed message. To preview the full message, specify '0'.; "NOTE: Messages are not truncated by default. Messages are truncated by words.".

Returns:

  • (Integer)

    Number of characters after which to truncate a previewed message. To preview the full message, specify '0'.; "NOTE: Messages are not truncated by default. Messages are truncated by words."



36
# File 'lib/vk/api/messages/methods/get.rb', line 36

attribute :preview_length, API::Types::Coercible::Int.optional.default(nil)

#time_offsetInteger

Returns Maximum time since a message was sent, in seconds. To return messages without a time limitation, set as '0'.

Returns:

  • (Integer)

    Maximum time since a message was sent, in seconds. To return messages without a time limitation, set as '0'.



34
# File 'lib/vk/api/messages/methods/get.rb', line 34

attribute :time_offset, API::Types::Coercible::Int.optional.default(nil)