Class: Vk::API::Account::Methods::SetSilenceMode

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

Overview

Mutes push notifications for the set period of time.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Account::Methods::SetSilenceMode

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :device_id (String)

    Unique device ID.

  • :time (Integer)

    Time in seconds for what notifications should be disabled. '-1' to disable forever.

  • :peer_id (Integer)

    Destination ID.; "For user:; 'User ID', e.g. '12345'.; ; For chat:; '2000000000' + 'Chat ID', e.g. '2000000001'.; ; For community:; '- Community ID', e.g. '-12345'.; "

  • :sound (Integer)

    '1' — to enable sound in this dialog, '0' — to disable sound. Only if 'peer_id' contains user or community ID.



# File 'lib/vk/api/account/methods/set_silence_mode.rb', line 15

Instance Method Details

#device_idString

Returns Unique device ID.

Returns:

  • (String)

    Unique device ID.



26
# File 'lib/vk/api/account/methods/set_silence_mode.rb', line 26

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

#peer_idInteger

Returns Destination ID.; "For user:; 'User ID', e.g. '12345'.; ; For chat:; '2000000000' + 'Chat ID', e.g. '2000000001'.; ; For community:; '- Community ID', e.g. '-12345'.; ".

Returns:

  • (Integer)

    Destination ID.; "For user:; 'User ID', e.g. '12345'.; ; For chat:; '2000000000' + 'Chat ID', e.g. '2000000001'.; ; For community:; '- Community ID', e.g. '-12345'.; "



30
# File 'lib/vk/api/account/methods/set_silence_mode.rb', line 30

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

#soundInteger

Returns '1' — to enable sound in this dialog, '0' — to disable sound. Only if 'peer_id' contains user or community ID.

Returns:

  • (Integer)

    '1' — to enable sound in this dialog, '0' — to disable sound. Only if 'peer_id' contains user or community ID.



32
# File 'lib/vk/api/account/methods/set_silence_mode.rb', line 32

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

#timeInteger

Returns Time in seconds for what notifications should be disabled. '-1' to disable forever.

Returns:

  • (Integer)

    Time in seconds for what notifications should be disabled. '-1' to disable forever.



28
# File 'lib/vk/api/account/methods/set_silence_mode.rb', line 28

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