Class: Vk::API::Auth
- Inherits:
-
Schema::Namespace
- Object
- Schema::Namespace
- Vk::API::Auth
- Defined in:
- lib/vk/api/methods.rb,
lib/vk/api/responses.rb,
lib/vk/api/auth/methods/signup.rb,
lib/vk/api/auth/methods/confirm.rb,
lib/vk/api/auth/methods/restore.rb,
lib/vk/api/auth/methods/check_phone.rb,
lib/vk/api/auth/responses/signup_response.rb,
lib/vk/api/auth/responses/confirm_response.rb,
lib/vk/api/auth/responses/restore_response.rb,
lib/vk/api/auth/responses/check_phone_response.rb
Defined Under Namespace
Instance Attribute Summary
Attributes inherited from Schema::Namespace
DSL collapse
-
#check_phone(arguments = {}) ⇒ Vk::API::Auth::Responses::CheckPhoneResponse
Checks a user's phone number for correctness.
-
#confirm(arguments = {}) ⇒ Vk::API::Auth::Responses::ConfirmResponse
Completes a user's registration (begun with the method) using an authorization code.
-
#restore(arguments = {}) ⇒ Vk::API::Auth::Responses::RestoreResponse
Allows to restore account access using a code received via SMS.; ; " This method is only available for apps with access.
-
#signup(arguments = {}) ⇒ Vk::API::Auth::Responses::SignupResponse
Registers a new user by phone number.
Methods inherited from Schema::Namespace
Constructor Details
This class inherits a constructor from Vk::Schema::Namespace
Instance Method Details
#check_phone(arguments = {}) ⇒ Vk::API::Auth::Responses::CheckPhoneResponse
Returns Checks a user's phone number for correctness.
166 167 168 169 170 171 172 |
# File 'lib/vk/api/methods.rb', line 166 def check_phone(arguments = {}) require "vk/api/auth/methods/check_phone" method = Methods::CheckPhone.new(arguments) response = method.call(@client) require "vk/api/auth/responses/check_phone_response" Responses::CheckPhoneResponse.new(response.deep_symbolize_keys) end |
#confirm(arguments = {}) ⇒ Vk::API::Auth::Responses::ConfirmResponse
Returns Completes a user's registration (begun with the method) using an authorization code.
203 204 205 206 207 208 209 |
# File 'lib/vk/api/methods.rb', line 203 def confirm(arguments = {}) require "vk/api/auth/methods/confirm" method = Methods::Confirm.new(arguments) response = method.call(@client) require "vk/api/auth/responses/confirm_response" Responses::ConfirmResponse.new(response.deep_symbolize_keys) end |
#restore(arguments = {}) ⇒ Vk::API::Auth::Responses::RestoreResponse
Returns Allows to restore account access using a code received via SMS.; ; " This method is only available for apps with access. ".
214 215 216 217 218 219 220 |
# File 'lib/vk/api/methods.rb', line 214 def restore(arguments = {}) require "vk/api/auth/methods/restore" method = Methods::Restore.new(arguments) response = method.call(@client) require "vk/api/auth/responses/restore_response" Responses::RestoreResponse.new(response.deep_symbolize_keys) end |
#signup(arguments = {}) ⇒ Vk::API::Auth::Responses::SignupResponse
Returns Registers a new user by phone number.
186 187 188 189 190 191 192 |
# File 'lib/vk/api/methods.rb', line 186 def signup(arguments = {}) require "vk/api/auth/methods/signup" method = Methods::Signup.new(arguments) response = method.call(@client) require "vk/api/auth/responses/signup_response" Responses::SignupResponse.new(response.deep_symbolize_keys) end |