Class: Vk::API::Messages::Methods::GetLongPollHistory

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

Overview

Returns updates in user's private messages.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :ts (Integer)

    Last value of the 'ts' parameter returned from the Long Poll server or by using method.

  • :pts (Integer)

    Lsat value of 'pts' parameter returned from the Long Poll server or by using method.

  • :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."

  • :onlines (Boolean)

    '1' — to return history with online users only.

  • :fields (Array)

    Additional to return.

  • :events_limit (Integer)

    Maximum nimber of events to return.

  • :msgs_limit (Integer)

    Maximum number of messages to return.

  • :max_msg_id (Integer)

    Maximum ID of the message among existing ones in the local copy. Both messages received with API methods (for example, , ), and data received from a Long Poll server (events with code 4) are taken into account.



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

Instance Method Details

#events_limitInteger

Returns Maximum nimber of events to return.

Returns:

  • (Integer)

    Maximum nimber of events to return.



40
# File 'lib/vk/api/messages/methods/get_long_poll_history.rb', line 40

attribute :events_limit, API::Types::Coercible::Int.optional.default(1000)

#fieldsArray

Returns Additional to return.

Returns:

  • (Array)

    Additional to return.



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

attribute :fields, API::Types::Coercible::Array.member(API::Types::Coercible::String).optional.default([])

#max_msg_idInteger

Returns Maximum ID of the message among existing ones in the local copy. Both messages received with API methods (for example, , ), and data received from a Long Poll server (events with code 4) are taken into account.

Returns:

  • (Integer)

    Maximum ID of the message among existing ones in the local copy. Both messages received with API methods (for example, , ), and data received from a Long Poll server (events with code 4) are taken into account.



44
# File 'lib/vk/api/messages/methods/get_long_poll_history.rb', line 44

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

#msgs_limitInteger

Returns Maximum number of messages to return.

Returns:

  • (Integer)

    Maximum number of messages to return.



42
# File 'lib/vk/api/messages/methods/get_long_poll_history.rb', line 42

attribute :msgs_limit, API::Types::Coercible::Int.optional.default(200)

#onlinesBoolean

Returns '1' — to return history with online users only.

Returns:

  • (Boolean)

    '1' — to return history with online users only.



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

attribute :onlines, 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."



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

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

#ptsInteger

Returns Lsat value of 'pts' parameter returned from the Long Poll server or by using method.

Returns:

  • (Integer)

    Lsat value of 'pts' parameter returned from the Long Poll server or by using method.



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

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

#tsInteger

Returns Last value of the 'ts' parameter returned from the Long Poll server or by using method.

Returns:

  • (Integer)

    Last value of the 'ts' parameter returned from the Long Poll server or by using method.



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

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