Class: Vk::API::Groups::Methods::BanUser

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/groups/methods/ban_user.rb

Overview

Adds a user to a community blacklist.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Groups::Methods::BanUser

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

  • :end_date (Integer)

    Date (in Unix time) when the user will be removed from the blacklist.

  • :reason (Integer)

    Reason for ban:; '1' — spam; '2' — verbal abuse; '3' — strong language; '4' — irrelevant messages; '0' — other (default)

  • :comment (String)

    Text of comment to ban.

  • :comment_visible (Boolean)

    '1' — text of comment will be visible to the user;; '0' — text of comment will be invisible to the user. ; By default: '0'.


# File 'lib/vk/api/groups/methods/ban_user.rb', line 15

Instance Method Details

#commentString

Returns Text of comment to ban.

Returns:

  • (String)

    Text of comment to ban.


36
# File 'lib/vk/api/groups/methods/ban_user.rb', line 36

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

#comment_visibleBoolean

Returns '1' — text of comment will be visible to the user;; '0' — text of comment will be invisible to the user. ; By default: '0'.

Returns:

  • (Boolean)

    '1' — text of comment will be visible to the user;; '0' — text of comment will be invisible to the user. ; By default: '0'.


38
# File 'lib/vk/api/groups/methods/ban_user.rb', line 38

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

#end_dateInteger

Returns Date (in Unix time) when the user will be removed from the blacklist.

Returns:

  • (Integer)

    Date (in Unix time) when the user will be removed from the blacklist.


32
# File 'lib/vk/api/groups/methods/ban_user.rb', line 32

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

#group_idInteger

Returns Community ID.

Returns:

  • (Integer)

    Community ID.


28
# File 'lib/vk/api/groups/methods/ban_user.rb', line 28

attribute :group_id, API::Types::Coercible::Int

#reasonInteger

Returns Reason for ban:; '1' — spam; '2' — verbal abuse; '3' — strong language; '4' — irrelevant messages; '0' — other (default).

Returns:

  • (Integer)

    Reason for ban:; '1' — spam; '2' — verbal abuse; '3' — strong language; '4' — irrelevant messages; '0' — other (default)


34
# File 'lib/vk/api/groups/methods/ban_user.rb', line 34

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

#user_idInteger

Returns User ID.

Returns:

  • (Integer)

    User ID.


30
# File 'lib/vk/api/groups/methods/ban_user.rb', line 30

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