Class: Vk::API::Messages::Methods::Search

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

Overview

Returns a list of the current user's private messages that match search criteria.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :q (String)

    Search query string.

  • :peer_id (Integer)

    Destination ID.; ; "For user:; 'User ID', e.g. '12345'.; ; For chat:; '2000000000' + 'chat_id', e.g. '2000000001'.; ; For community:; '- community ID', e.g. '-12345'.; "

  • :date (Integer)

    Date to search message before in Unixtime.

  • :count (Integer)

    Number of messages to return.


# File 'lib/vk/api/messages/methods/search.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/search.rb', line 32

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

#dateInteger

Returns Date to search message before in Unixtime.

Returns:

  • (Integer)

    Date to search message before in Unixtime.


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

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

#peer_idInteger

Returns Destination ID.; ; "For user:; 'User ID', e.g. '12345'.; ; For chat:; '2000000000' + 'chat_id', e.g. '2000000001'.; ; For community:; '- community ID', e.g. '-12345'.; ".

Returns:

  • (Integer)

    Destination ID.; ; "For user:; 'User ID', e.g. '12345'.; ; For chat:; '2000000000' + 'chat_id', e.g. '2000000001'.; ; For community:; '- community ID', e.g. '-12345'.; "


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

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

#qString

Returns Search query string.

Returns:

  • (String)

    Search query string.


26
# File 'lib/vk/api/messages/methods/search.rb', line 26

attribute :q, API::Types::Coercible::String.optional.default(nil)