Class: Vk::API::Widgets

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/widgets/widget_page.rb,
lib/vk/api/widgets/widget_likes.rb,
lib/vk/api/widgets/comment_media.rb,
lib/vk/api/widgets/widget_comment.rb,
lib/vk/api/widgets/comment_replies.rb,
lib/vk/api/widgets/methods/get_pages.rb,
lib/vk/api/widgets/comment_replies_item.rb,
lib/vk/api/widgets/methods/get_comments.rb,
lib/vk/api/widgets/responses/get_pages_response.rb,
lib/vk/api/widgets/responses/get_comments_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: CommentMedia, CommentReplies, CommentRepliesItem, WidgetComment, WidgetLikes, WidgetPage

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_comments(arguments = {}) ⇒ Vk::API::Widgets::Responses::GetCommentsResponse

Returns Gets a list of comments for the page added through the .

Parameters:

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

Options Hash (arguments):

  • :widget_api_id (Integer)

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :url (String)

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :page_id (String)

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :order (String) — default: nil

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :fields (Array)

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :count (Integer) — default: 10

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

Returns:

See Also:


1491
1492
1493
1494
1495
1496
1497
# File 'lib/vk/api/methods.rb', line 1491

def get_comments(arguments = {})
  require "vk/api/widgets/methods/get_comments"
  method = Methods::GetComments.new(arguments)
  response = method.call(@client)
  require "vk/api/widgets/responses/get_comments_response"
  Responses::GetCommentsResponse.new(response.deep_symbolize_keys)
end

#get_pages(arguments = {}) ⇒ Vk::API::Widgets::Responses::GetPagesResponse

Returns Gets a list of application/site pages where the or is installed.

Parameters:

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

Options Hash (arguments):

  • :widget_api_id (Integer)

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :order (String) — default: nil

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :period (String) — default: nil

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

  • :count (Integer) — default: 10

    @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json

Returns:

See Also:


1505
1506
1507
1508
1509
1510
1511
# File 'lib/vk/api/methods.rb', line 1505

def get_pages(arguments = {})
  require "vk/api/widgets/methods/get_pages"
  method = Methods::GetPages.new(arguments)
  response = method.call(@client)
  require "vk/api/widgets/responses/get_pages_response"
  Responses::GetPagesResponse.new(response.deep_symbolize_keys)
end