Class: Vk::API::Friends::Methods::Search

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

Overview

Returns a list of friends matching the search criteria.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :user_id (Integer)

    User ID.

  • :q (String)

    Search query string (e.g., 'Vasya Babich').

  • :fields (Array, 'bdate')

    Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online';

  • :name_case (String)

    Case for declension of user name and surname:; 'nom' — nominative (default); 'gen' — genitive ; 'dat' — dative; 'acc' — accusative ; 'ins' — instrumental ; 'abl' — prepositional

  • :offset (Integer)

    Offset needed to return a specific subset of friends.

  • :count (Integer)

    Number of friends to return.



# File 'lib/vk/api/friends/methods/search.rb', line 15

Instance Method Details

#countInteger

Returns Number of friends to return.

Returns:

  • (Integer)

    Number of friends to return.



38
# File 'lib/vk/api/friends/methods/search.rb', line 38

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

#fieldsArray, 'bdate'

Returns Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online';.

Returns:

  • (Array, 'bdate')

    Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online';



32
# File 'lib/vk/api/friends/methods/search.rb', line 32

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

#name_caseString

Returns Case for declension of user name and surname:; 'nom' — nominative (default); 'gen' — genitive ; 'dat' — dative; 'acc' — accusative ; 'ins' — instrumental ; 'abl' — prepositional.

Returns:

  • (String)

    Case for declension of user name and surname:; 'nom' — nominative (default); 'gen' — genitive ; 'dat' — dative; 'acc' — accusative ; 'ins' — instrumental ; 'abl' — prepositional



34
# File 'lib/vk/api/friends/methods/search.rb', line 34

attribute :name_case, API::Types::Coercible::String.enum("nom", "gen", "dat", "acc", "ins", "abl").optional.default("nom")

#offsetInteger

Returns Offset needed to return a specific subset of friends.

Returns:

  • (Integer)

    Offset needed to return a specific subset of friends.



36
# File 'lib/vk/api/friends/methods/search.rb', line 36

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

#qString

Returns Search query string (e.g., 'Vasya Babich').

Returns:

  • (String)

    Search query string (e.g., 'Vasya Babich').



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

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

#user_idInteger

Returns User ID.

Returns:

  • (Integer)

    User ID.



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

attribute :user_id, API::Types::Coercible::Int