Class: Vk::API::Friends::Methods::Get

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

Overview

Returns a list of user IDs or detailed information about a user's friends.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :user_id (Integer)

    User ID. By default, the current user ID.

  • :order (String)

    Sort order: ; 'name' — by name (enabled only if the 'fields' parameter is used); 'hints' — by rating, similar to how friends are sorted in My friends section; ; This parameter is available only for .

  • :list_id (Integer)

    ID of the friend list returned by the method to be used as the source. This parameter is taken into account only when the uid parameter is set to the current user ID.; ; This parameter is available only for .;

  • :count (Integer)

    Number of friends to return.

  • :offset (Integer)

    Offset needed to return a specific subset of friends.

  • :fields (Array, 'bdate')

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

  • :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.rb', line 15

Instance Method Details

#countInteger

Returns Number of friends to return.

Returns:

  • (Integer)

    Number of friends to return.



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

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

#fieldsArray, 'bdate'

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

Returns:

  • (Array, 'bdate')

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



39
# File 'lib/vk/api/friends/methods/get.rb', line 39

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

#list_idInteger

Returns ID of the friend list returned by the method to be used as the source. This parameter is taken into account only when the uid parameter is set to the current user ID.; ; This parameter is available only for .;.

Returns:

  • (Integer)

    ID of the friend list returned by the method to be used as the source. This parameter is taken into account only when the uid parameter is set to the current user ID.; ; This parameter is available only for .;



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

attribute :list_id, API::Types::Coercible::Int.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



41
# File 'lib/vk/api/friends/methods/get.rb', line 41

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 friends.

Returns:

  • (Integer)

    Offset needed to return a specific subset of friends.



37
# File 'lib/vk/api/friends/methods/get.rb', line 37

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

#orderString

Returns Sort order: ; 'name' — by name (enabled only if the 'fields' parameter is used); 'hints' — by rating, similar to how friends are sorted in My friends section; ; This parameter is available only for .

Returns:

  • (String)

    Sort order: ; 'name' — by name (enabled only if the 'fields' parameter is used); 'hints' — by rating, similar to how friends are sorted in My friends section; ; This parameter is available only for .



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

attribute :order, API::Types::Coercible::String.enum("name", "hints").optional.default(nil)

#user_idInteger

Returns User ID. By default, the current user ID.

Returns:

  • (Integer)

    User ID. By default, the current user ID.



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

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