Class: Vk::API::Friends::Methods::GetSuggestions

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

Overview

Returns a list of profiles of users whom the current user may know.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :filter (Array)

    Types of potential friends to return:; 'mutual' — users with many mutual friends ; 'contacts' — users found with the method; 'mutual_contacts' — users who imported the same contacts as the current user with the method

  • :count (Integer)

    Number of suggestions to return.

  • :offset (Integer)

    Offset needed to return a specific subset of suggestions.

  • :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', 'counters'.;

  • :name_case (String)

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



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

Instance Method Details

#countInteger

Returns Number of suggestions to return.

Returns:

  • (Integer)

    Number of suggestions to return.



29
# File 'lib/vk/api/friends/methods/get_suggestions.rb', line 29

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

#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', 'counters'.;.

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', 'counters'.;



33
# File 'lib/vk/api/friends/methods/get_suggestions.rb', line 33

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

#filterArray

Returns Types of potential friends to return:; 'mutual' — users with many mutual friends ; 'contacts' — users found with the method; 'mutual_contacts' — users who imported the same contacts as the current user with the method.

Returns:

  • (Array)

    Types of potential friends to return:; 'mutual' — users with many mutual friends ; 'contacts' — users found with the method; 'mutual_contacts' — users who imported the same contacts as the current user with the method



27
# File 'lib/vk/api/friends/methods/get_suggestions.rb', line 27

attribute :filter, 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



35
# File 'lib/vk/api/friends/methods/get_suggestions.rb', line 35

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

#offsetInteger

Returns Offset needed to return a specific subset of suggestions.

Returns:

  • (Integer)

    Offset needed to return a specific subset of suggestions.



31
# File 'lib/vk/api/friends/methods/get_suggestions.rb', line 31

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