Class: Vk::API::Board::Methods::AddTopic

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

Overview

Creates a new 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::AddTopic

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :group_id (Integer)

    ID of the community that owns the discussion board.

  • :title (String)

    Topic title.

  • :text (String)

    Text of the topic.

  • :from_group (Boolean)

    For a community:; '1' — to post the topic as by the community; '0' — to post the topic as by the user (default)

  • :attachments (Array)

    List of media objects attached to the topic, in the following format:; ","; '' — Type of media object:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media owner. ; '' — Media ID.; ; Example:; "photo100172_166443618,photo66748_265827614"; ; "NOTE: If you try to attach more than one reference, an error will be thrown.";


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

Instance Method Details

#attachmentsArray

Returns List of media objects attached to the topic, in the following format:; ","; '' — Type of media object:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media owner. ; '' — Media ID.; ; Example:; "photo100172_166443618,photo66748_265827614"; ; "NOTE: If you try to attach more than one reference, an error will be thrown.";.

Returns:

  • (Array)

    List of media objects attached to the topic, in the following format:; ","; '' — Type of media object:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media owner. ; '' — Media ID.; ; Example:; "photo100172_166443618,photo66748_265827614"; ; "NOTE: If you try to attach more than one reference, an error will be thrown.";


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

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

#from_groupBoolean

Returns For a community:; '1' — to post the topic as by the community; '0' — to post the topic as by the user (default).

Returns:

  • (Boolean)

    For a community:; '1' — to post the topic as by the community; '0' — to post the topic as by the user (default)


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

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.


27
# File 'lib/vk/api/board/methods/add_topic.rb', line 27

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

#textString

Returns Text of the topic.

Returns:

  • (String)

    Text of the topic.


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

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

#titleString

Returns Topic title.

Returns:

  • (String)

    Topic title.


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

attribute :title, API::Types::Coercible::String