Class: Vk::API::Account::Methods::RegisterDevice

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

Overview

Subscribes an iOS/Android/Windows Phone-based device to receive push notifications

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :token (String)

    Device token used to send notifications. (for mpns, the token shall be URL for sending of notifications)

  • :device_model (String)

    String name of device model.

  • :device_year (Integer)

    Device year.

  • :device_id (String)

    Unique device ID.

  • :system_version (String)

    String version of device operating system.

  • :settings (String)

    Push settings in a .


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

Instance Method Details

#device_idString

Returns Unique device ID.

Returns:

  • (String)

    Unique device ID.


34
# File 'lib/vk/api/account/methods/register_device.rb', line 34

attribute :device_id, API::Types::Coercible::String

#device_modelString

Returns String name of device model.

Returns:

  • (String)

    String name of device model.


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

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

#device_yearInteger

Returns Device year.

Returns:

  • (Integer)

    Device year.


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

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

#settingsString

Returns Push settings in a .

Returns:

  • (String)

    Push settings in a .


38
# File 'lib/vk/api/account/methods/register_device.rb', line 38

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

#system_versionString

Returns String version of device operating system.

Returns:

  • (String)

    String version of device operating system.


36
# File 'lib/vk/api/account/methods/register_device.rb', line 36

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

#tokenString

Returns Device token used to send notifications. (for mpns, the token shall be URL for sending of notifications).

Returns:

  • (String)

    Device token used to send notifications. (for mpns, the token shall be URL for sending of notifications)


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

attribute :token, API::Types::Coercible::String