Class: Vk::API::Utils

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/utils/link_checked.rb,
lib/vk/api/utils/domain_resolved.rb,
lib/vk/api/utils/methods/check_link.rb,
lib/vk/api/utils/methods/get_server_time.rb,
lib/vk/api/utils/methods/resolve_screen_name.rb,
lib/vk/api/utils/responses/check_link_response.rb,
lib/vk/api/utils/responses/get_server_time_response.rb,
lib/vk/api/utils/responses/resolve_screen_name_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: DomainResolved, LinkChecked

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

Returns Checks whether a link is blocked in VK.

Parameters:

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

Options Hash (arguments):

Returns:

See Also:



5376
5377
5378
5379
5380
5381
5382
# File 'lib/vk/api/methods.rb', line 5376

def check_link(arguments = {})
  require "vk/api/utils/methods/check_link"
  method = Methods::CheckLink.new(arguments)
  response = method.call(@client)
  require "vk/api/utils/responses/check_link_response"
  Responses::CheckLinkResponse.new(response.deep_symbolize_keys)
end

#get_server_time(arguments = {}) ⇒ Vk::API::Utils::Responses::GetServerTimeResponse

Returns the current time of the VK server.

Parameters:

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

Returns:

See Also:



5397
5398
5399
5400
5401
5402
5403
# File 'lib/vk/api/methods.rb', line 5397

def get_server_time(arguments = {})
  require "vk/api/utils/methods/get_server_time"
  method = Methods::GetServerTime.new(arguments)
  response = method.call(@client)
  require "vk/api/utils/responses/get_server_time_response"
  Responses::GetServerTimeResponse.new(response.deep_symbolize_keys)
end

#resolve_screen_name(arguments = {}) ⇒ Vk::API::Utils::Responses::ResolveScreenNameResponse

Returns Detects a type of object (e.g., user, community, application) and its ID by screen name.

Parameters:

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

Options Hash (arguments):

  • :screen_name (String)

    Screen name of the user, community (e.g., 'apiclub,' 'andrew', or 'rules_of_war'), or application.

Returns:

See Also:



5387
5388
5389
5390
5391
5392
5393
# File 'lib/vk/api/methods.rb', line 5387

def resolve_screen_name(arguments = {})
  require "vk/api/utils/methods/resolve_screen_name"
  method = Methods::ResolveScreenName.new(arguments)
  response = method.call(@client)
  require "vk/api/utils/responses/resolve_screen_name_response"
  Responses::ResolveScreenNameResponse.new(response.deep_symbolize_keys)
end