Class: Vk::API::Friends::Methods::Add

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

Overview

Approves or creates a friend request.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :user_id (Integer)

    ID of the user whose friend request will be approved or to whom a friend request will be sent.

  • :text (String)

    Text of the message (up to 500 characters) for the friend request, if any.

  • :follow (Boolean)

    ‘1’ to pass an incoming request to followers list.



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

Instance Method Details

#followBoolean

Returns ‘1’ to pass an incoming request to followers list.

Returns:

  • (Boolean)

    ‘1’ to pass an incoming request to followers list.



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

attribute :follow, API::Types::Form::Bool.optional.default(nil)

#textString

Returns Text of the message (up to 500 characters) for the friend request, if any.

Returns:

  • (String)

    Text of the message (up to 500 characters) for the friend request, if any.



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

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

#user_idInteger

Returns ID of the user whose friend request will be approved or to whom a friend request will be sent.

Returns:

  • (Integer)

    ID of the user whose friend request will be approved or to whom a friend request will be sent.



25
# File 'lib/vk/api/friends/methods/add.rb', line 25

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