Class: Vk::API::Storage
- Inherits:
-
Schema::Namespace
- Object
- Schema::Namespace
- Vk::API::Storage
- Defined in:
- lib/vk/api/methods.rb,
lib/vk/api/responses.rb,
lib/vk/api/storage/methods/get.rb,
lib/vk/api/storage/methods/set.rb,
lib/vk/api/storage/methods/get_keys.rb,
lib/vk/api/storage/responses/get_response.rb,
lib/vk/api/storage/responses/set_response.rb,
lib/vk/api/storage/responses/get_keys_response.rb
Defined Under Namespace
Instance Attribute Summary
Attributes inherited from Schema::Namespace
DSL collapse
-
#get(arguments = {}) ⇒ Vk::API::Storage::Responses::GetResponse
Returns a value of variable with the name set by key parameter.
-
#get_keys(arguments = {}) ⇒ Vk::API::Storage::Responses::GetKeysResponse
Returns the names of all variables.
-
#set(arguments = {}) ⇒ Vk::API::Storage::Responses::SetResponse
Saves a value of variable with the name set by 'key' parameter.
Methods inherited from Schema::Namespace
Constructor Details
This class inherits a constructor from Vk::Schema::Namespace
Instance Method Details
#get(arguments = {}) ⇒ Vk::API::Storage::Responses::GetResponse
Returns a value of variable with the name set by key parameter.
1666 1667 1668 1669 1670 1671 1672 |
# File 'lib/vk/api/methods.rb', line 1666 def get(arguments = {}) require "vk/api/storage/methods/get" method = Methods::Get.new(arguments) response = method.call(@client) require "vk/api/storage/responses/get_response" Responses::GetResponse.new(response.deep_symbolize_keys) end |
#get_keys(arguments = {}) ⇒ Vk::API::Storage::Responses::GetKeysResponse
Returns the names of all variables.
1691 1692 1693 1694 1695 1696 1697 |
# File 'lib/vk/api/methods.rb', line 1691 def get_keys(arguments = {}) require "vk/api/storage/methods/get_keys" method = Methods::GetKeys.new(arguments) response = method.call(@client) require "vk/api/storage/responses/get_keys_response" Responses::GetKeysResponse.new(response.deep_symbolize_keys) end |
#set(arguments = {}) ⇒ Vk::API::Storage::Responses::SetResponse
Returns Saves a value of variable with the name set by 'key' parameter.
1679 1680 1681 1682 1683 1684 1685 |
# File 'lib/vk/api/methods.rb', line 1679 def set(arguments = {}) require "vk/api/storage/methods/set" method = Methods::Set.new(arguments) response = method.call(@client) require "vk/api/storage/responses/set_response" Responses::SetResponse.new(response.deep_symbolize_keys) end |