Class: Vk::API::Auth::Methods::Signup

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/auth/methods/signup.rb

Overview

Registers a new user by phone number.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Auth::Methods::Signup

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :first_name (String) —

    User's first name.

  • :last_name (String) —

    User's surname.

  • :client_id (Integer) —

    Your application ID.

  • :client_secret (String) —
  • :phone (String) —

    User's phone number. Can be pre-checked with the method.

  • :password (String) —

    User's password (minimum of 6 characters). Can be specified later with the method.

  • :test_mode (Boolean) —

    '1' — test mode, in which the user will not be registered and the phone number will not be checked for availability; '0' — default mode (default)

  • :voice (Boolean) —

    '1' — call the phone number and leave a voice message of the authorization code; '0' — send the code by SMS (default)

  • :sex (Integer) —

    '1' — female; '2' — male

  • :sid (String) —

    Session ID required for method recall when SMS was not delivered.



# File 'lib/vk/api/auth/methods/signup.rb', line 15

Instance Method Details

#client_id ⇒ Integer

Returns Your application ID.

Returns:

  • (Integer) —

    Your application ID.



36
# File 'lib/vk/api/auth/methods/signup.rb', line 36

attribute :client_id, API::Types::Coercible::Int

#client_secret ⇒ String



38
# File 'lib/vk/api/auth/methods/signup.rb', line 38

attribute :client_secret, API::Types::Coercible::String

#first_name ⇒ String

Returns User's first name.

Returns:

  • (String) —

    User's first name.



32
# File 'lib/vk/api/auth/methods/signup.rb', line 32

attribute :first_name, API::Types::Coercible::String

#last_name ⇒ String

Returns User's surname.

Returns:

  • (String) —

    User's surname.



34
# File 'lib/vk/api/auth/methods/signup.rb', line 34

attribute :last_name, API::Types::Coercible::String

#password ⇒ String

Returns User's password (minimum of 6 characters). Can be specified later with the method.

Returns:

  • (String) —

    User's password (minimum of 6 characters). Can be specified later with the method.



42
# File 'lib/vk/api/auth/methods/signup.rb', line 42

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

#phone ⇒ String

Returns User's phone number. Can be pre-checked with the method.

Returns:

  • (String) —

    User's phone number. Can be pre-checked with the method.



40
# File 'lib/vk/api/auth/methods/signup.rb', line 40

attribute :phone, API::Types::Coercible::String

#sex ⇒ Integer

Returns '1' — female; '2' — male.

Returns:

  • (Integer) —

    '1' — female; '2' — male



48
# File 'lib/vk/api/auth/methods/signup.rb', line 48

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

#sid ⇒ String

Returns Session ID required for method recall when SMS was not delivered.

Returns:

  • (String) —

    Session ID required for method recall when SMS was not delivered.



50
# File 'lib/vk/api/auth/methods/signup.rb', line 50

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

#test_mode ⇒ Boolean

Returns '1' — test mode, in which the user will not be registered and the phone number will not be checked for availability; '0' — default mode (default).

Returns:

  • (Boolean) —

    '1' — test mode, in which the user will not be registered and the phone number will not be checked for availability; '0' — default mode (default)



44
# File 'lib/vk/api/auth/methods/signup.rb', line 44

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

#voice ⇒ Boolean

Returns '1' — call the phone number and leave a voice message of the authorization code; '0' — send the code by SMS (default).

Returns:

  • (Boolean) —

    '1' — call the phone number and leave a voice message of the authorization code; '0' — send the code by SMS (default)



46
# File 'lib/vk/api/auth/methods/signup.rb', line 46

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