Class: Vk::API::Board::Methods::CreateComment

Inherits:
Schema::Method
  • Object
show all
Defined in:
lib/vk/api/board/methods/create_comment.rb

Overview

Adds a comment on a topic on a community's discussion board.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Board::Methods::CreateComment

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :group_id (Integer)

    ID of the community that owns the discussion board.

  • :topic_id (Integer)

    ID of the topic to be commented on.

  • :message (String) — default: Required if 'attachments' is not set.

    Text of the comment.

  • :attachments (Array) — default: Required if 'text' is not set.

    List of media objects attached to the comment, in the following format:; ","; '' — Type of media object:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media owner. ; '' — Media ID.

  • :from_group (Boolean)

    '1' — to post the comment as by the community; '0' — to post the comment as by the user (default)

  • :sticker_id (Integer)

    Sticker ID.

  • :guid (String)

    Unique identifier to avoid repeated comments.



# File 'lib/vk/api/board/methods/create_comment.rb', line 15

Instance Method Details

#attachmentsArray

Returns (Required if 'text' is not set.) List of media objects attached to the comment, in the following format:; ","; '' — Type of media object:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media owner. ; '' — Media ID.

Returns:

  • (Array)

    (Required if 'text' is not set.) List of media objects attached to the comment, in the following format:; ","; '' — Type of media object:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media owner. ; '' — Media ID.



35
# File 'lib/vk/api/board/methods/create_comment.rb', line 35

attribute :attachments, API::Types::Coercible::Array.member(API::Types::Coercible::String).optional.default(nil)

#from_groupBoolean

Returns '1' — to post the comment as by the community; '0' — to post the comment as by the user (default).

Returns:

  • (Boolean)

    '1' — to post the comment as by the community; '0' — to post the comment as by the user (default)



37
# File 'lib/vk/api/board/methods/create_comment.rb', line 37

attribute :from_group, API::Types::Form::Bool.optional.default(nil)

#group_idInteger

Returns ID of the community that owns the discussion board.

Returns:

  • (Integer)

    ID of the community that owns the discussion board.



29
# File 'lib/vk/api/board/methods/create_comment.rb', line 29

attribute :group_id, API::Types::Coercible::Int

#guidString

Returns Unique identifier to avoid repeated comments.

Returns:

  • (String)

    Unique identifier to avoid repeated comments.



41
# File 'lib/vk/api/board/methods/create_comment.rb', line 41

attribute :guid, API::Types::Coercible::String.optional.default(nil)

#messageString

Returns (Required if 'attachments' is not set.) Text of the comment.

Returns:

  • (String)

    (Required if 'attachments' is not set.) Text of the comment.



33
# File 'lib/vk/api/board/methods/create_comment.rb', line 33

attribute :message, API::Types::Coercible::String.optional.default(nil)

#sticker_idInteger

Returns Sticker ID.

Returns:

  • (Integer)

    Sticker ID.



39
# File 'lib/vk/api/board/methods/create_comment.rb', line 39

attribute :sticker_id, API::Types::Coercible::Int.optional.default(nil)

#topic_idInteger

Returns ID of the topic to be commented on.

Returns:

  • (Integer)

    ID of the topic to be commented on.



31
# File 'lib/vk/api/board/methods/create_comment.rb', line 31

attribute :topic_id, API::Types::Coercible::Int