Class: Vk::API::Photos::Methods::CreateComment

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

Overview

Adds a new comment on the photo.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

  • :message (String)

    Comment text.

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

    List of objects attached to the post, in the following format:; “

    Maruku could not parse this XML/HTML: 
    <owner_id>_<media_id>,<owner_id>_<media_id>"; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '<owner_id>' — Media attachment owner ID.; '<media_id>' — Media attachment ID.; ; Example:; "photo100172_166443618,photo66748_265827614"

  • :from_group (Boolean)

    ‘1’ — to post a comment from the community

  • :reply_to_comment (Integer)
  • :sticker_id (Integer)

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

  • :access_key (String)

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

  • :guid (String)

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



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

Instance Method Details

#access_keyString

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

Returns:

  • (String)

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



45
# File 'lib/vk/api/photos/methods/create_comment.rb', line 45

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

#attachmentsArray

Returns (Required if ‘message’ is not set.) List of objects attached to the post, in the following format:; “

Maruku could not parse this XML/HTML: 
<owner_id>_<media_id>,<owner_id>_<media_id>"; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '<owner_id>' — Media attachment owner ID.; '<media_id>' — Media attachment ID.; ; Example:; "photo100172_166443618,photo66748_265827614".

Returns:

  • (Array)

    (Required if ‘message’ is not set.) List of objects attached to the post, in the following format:; “

    Maruku could not parse this XML/HTML: 
    <owner_id>_<media_id>,<owner_id>_<media_id>"; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '<owner_id>' — Media attachment owner ID.; '<media_id>' — Media attachment ID.; ; Example:; "photo100172_166443618,photo66748_265827614"



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

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

#from_groupBoolean

Returns ‘1’ — to post a comment from the community.

Returns:

  • (Boolean)

    ‘1’ — to post a comment from the community



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

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

#guidString

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

Returns:

  • (String)

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



47
# File 'lib/vk/api/photos/methods/create_comment.rb', line 47

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

#messageString

Returns Comment text.

Returns:

  • (String)

    Comment text.



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

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

#owner_idInteger

Returns ID of the user or community that owns the photo.

Returns:

  • (Integer)

    ID of the user or community that owns the photo.



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

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

#photo_idInteger

Returns Photo ID.

Returns:

  • (Integer)

    Photo ID.



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

attribute :photo_id, API::Types::Coercible::Int

#reply_to_commentInteger

Returns:

  • (Integer)


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

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

#sticker_idInteger

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

Returns:

  • (Integer)

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



43
# File 'lib/vk/api/photos/methods/create_comment.rb', line 43

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