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

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



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

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

#fieldsArray, 'bdate'



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



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

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

#name_caseString



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



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

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

#orderString



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



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

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