Class: Vk::API::Status

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/status/status.rb,
lib/vk/api/status/methods/get.rb,
lib/vk/api/status/methods/set.rb,
lib/vk/api/status/responses/get_response.rb,
lib/vk/api/status/responses/set_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: Status

Instance Attribute Summary

Attributes inherited from Schema::Namespace

#client

DSL collapse

Methods inherited from Schema::Namespace

#call, #initialize

Constructor Details

This class inherits a constructor from Vk::Schema::Namespace

Instance Method Details

#get(arguments = {}) ⇒ Vk::API::Status::Responses::GetResponse

Returns data required to show the status of a user or community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



1774
1775
1776
1777
1778
1779
1780
# File 'lib/vk/api/methods.rb', line 1774

def get(arguments = {})
  require "vk/api/status/methods/get"
  method = Methods::Get.new(arguments)
  response = method.call(@client)
  require "vk/api/status/responses/get_response"
  Responses::GetResponse.new(response.deep_symbolize_keys)
end

#set(arguments = {}) ⇒ Vk::API::Status::Responses::SetResponse

Returns Sets a new status for the current user.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :text (String)

    Text of the new status.

  • :group_id (Integer)

    Identifier of a community to set a status in. If left blank the status is set to current user.

Returns:

See Also:



1786
1787
1788
1789
1790
1791
1792
# File 'lib/vk/api/methods.rb', line 1786

def set(arguments = {})
  require "vk/api/status/methods/set"
  method = Methods::Set.new(arguments)
  response = method.call(@client)
  require "vk/api/status/responses/set_response"
  Responses::SetResponse.new(response.deep_symbolize_keys)
end