Class: Vk::API::Market::Methods::CreateComment

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

Overview

Creates a new comment for an item.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Item ID.

  • :message (String)

    Comment text (required if 'attachments' parameter is not specified)

  • :attachments (Array)

    Comma-separated list of objects attached to a comment. The field is submitted the following way: ; "','"; ; '' - media attachment type:; "'photo' - photo; 'video' - video; 'audio' - audio; 'doc' - document"; ; '' - media owner id; '' - media attachment id; ; For example:; "photo100172_166443618,photo66748_265827614";

  • :from_group (Boolean)

    '1' - comment will be published on behalf of a community, '0' - on behalf of a user (by default).

  • :reply_to_comment (Integer)

    ID of a comment to reply with current comment to.

  • :sticker_id (Integer)

    Sticker ID.

  • :guid (String)

    Random value to avoid resending one comment.


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

Instance Method Details

#attachmentsArray

Returns Comma-separated list of objects attached to a comment. The field is submitted the following way: ; "','"; ; '' - media attachment type:; "'photo' - photo; 'video' - video; 'audio' - audio; 'doc' - document"; ; '' - media owner id; '' - media attachment id; ; For example:; "photo100172_166443618,photo66748_265827614";.

Returns:

  • (Array)

    Comma-separated list of objects attached to a comment. The field is submitted the following way: ; "','"; ; '' - media attachment type:; "'photo' - photo; 'video' - video; 'audio' - audio; 'doc' - document"; ; '' - media owner id; '' - media attachment id; ; For example:; "photo100172_166443618,photo66748_265827614";


36
# File 'lib/vk/api/market/methods/create_comment.rb', line 36

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

#from_groupBoolean

Returns '1' - comment will be published on behalf of a community, '0' - on behalf of a user (by default).

Returns:

  • (Boolean)

    '1' - comment will be published on behalf of a community, '0' - on behalf of a user (by default).


38
# File 'lib/vk/api/market/methods/create_comment.rb', line 38

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

#guidString

Returns Random value to avoid resending one comment.

Returns:

  • (String)

    Random value to avoid resending one comment.


44
# File 'lib/vk/api/market/methods/create_comment.rb', line 44

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

#item_idInteger

Returns Item ID.

Returns:

  • (Integer)

    Item ID.


32
# File 'lib/vk/api/market/methods/create_comment.rb', line 32

attribute :item_id, API::Types::Coercible::Int

#messageString

Returns Comment text (required if 'attachments' parameter is not specified).

Returns:

  • (String)

    Comment text (required if 'attachments' parameter is not specified)


34
# File 'lib/vk/api/market/methods/create_comment.rb', line 34

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

#owner_idInteger

Returns ID of an item owner community.

Returns:

  • (Integer)

    ID of an item owner community.


30
# File 'lib/vk/api/market/methods/create_comment.rb', line 30

attribute :owner_id, API::Types::Coercible::Int

#reply_to_commentInteger

Returns ID of a comment to reply with current comment to.

Returns:

  • (Integer)

    ID of a comment to reply with current comment to.


40
# File 'lib/vk/api/market/methods/create_comment.rb', line 40

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

#sticker_idInteger

Returns Sticker ID.

Returns:

  • (Integer)

    Sticker ID.


42
# File 'lib/vk/api/market/methods/create_comment.rb', line 42

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