Class: Vk::API::Wall::Methods::Edit

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/wall/methods/edit.rb

Overview

Edits a post on a user wall or community wall.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Wall::Methods::Edit

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :owner_id (Integer)

    User ID or community ID. Use a negative value to designate a community ID.

  • :post_id (Integer)

    Post ID.

  • :friends_only (Boolean) — default: Applies only when editing a scheduled post.

    ; '1' — post will be available to friends only; '0' — post will be available to all users (default)

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

    Text of the post.

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

    List of objects attached to the post, in the following format:; ","; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media application owner.; '' — Media application ID. ; ; Example:; "photo100172_166443618,photo66748_265827614"; May contain a link to an external page to include in the post. Example:; "photo66748_265827614,http://habrahabr.ru"; "NOTE: If more than one link is being attached, an error is thrown."

  • :services (String, 'facebook') — default: Applies only to a scheduled post.

    List of services or websites where status will be updated, if the user has so requested. Sample values: 'twitter', 'facebook'.

  • :signed (Boolean) — default: Applies only to a post that was created "as community" on a community wall.

    ; '1' — to add the signature of the user who created the post

  • :publish_date (Integer) — default: Applies only to a scheduled post.

    Publication date (in Unix time). If used, posting will be delayed until the set time.

  • :lat (Number)

    Geographical latitude of the check-in, in degrees (from -90 to 90).

  • :long (Number)

    Geographical longitude of the check-in, in degrees (from -180 to 180).

  • :place_id (Integer)

    ID of the location where the user was tagged.

  • :mark_as_ads (Boolean)


# File 'lib/vk/api/wall/methods/edit.rb', line 15

Instance Method Details

#attachmentsArray

Returns (Required if 'message' is not set.) List of objects attached to the post, in the following format:; ","; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media application owner.; '' — Media application ID. ; ; Example:; "photo100172_166443618,photo66748_265827614"; May contain a link to an external page to include in the post. Example:; "photo66748_265827614,http://habrahabr.ru"; "NOTE: If more than one link is being attached, an error is thrown.".

Returns:

  • (Array)

    (Required if 'message' is not set.) List of objects attached to the post, in the following format:; ","; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — ID of the media application owner.; '' — Media application ID. ; ; Example:; "photo100172_166443618,photo66748_265827614"; May contain a link to an external page to include in the post. Example:; "photo66748_265827614,http://habrahabr.ru"; "NOTE: If more than one link is being attached, an error is thrown."



42
# File 'lib/vk/api/wall/methods/edit.rb', line 42

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

#friends_onlyBoolean

Returns (Applies only when editing a scheduled post.); '1' — post will be available to friends only; '0' — post will be available to all users (default).

Returns:

  • (Boolean)

    (Applies only when editing a scheduled post.); '1' — post will be available to friends only; '0' — post will be available to all users (default)



38
# File 'lib/vk/api/wall/methods/edit.rb', line 38

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

#latNumber

Returns Geographical latitude of the check-in, in degrees (from -90 to 90).

Returns:

  • (Number)

    Geographical latitude of the check-in, in degrees (from -90 to 90).



50
# File 'lib/vk/api/wall/methods/edit.rb', line 50

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

#longNumber

Returns Geographical longitude of the check-in, in degrees (from -180 to 180).

Returns:

  • (Number)

    Geographical longitude of the check-in, in degrees (from -180 to 180).



52
# File 'lib/vk/api/wall/methods/edit.rb', line 52

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

#mark_as_adsBoolean



56
# File 'lib/vk/api/wall/methods/edit.rb', line 56

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

#messageString

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

Returns:

  • (String)

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



40
# File 'lib/vk/api/wall/methods/edit.rb', line 40

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

#owner_idInteger

Returns User ID or community ID. Use a negative value to designate a community ID.

Returns:

  • (Integer)

    User ID or community ID. Use a negative value to designate a community ID.



34
# File 'lib/vk/api/wall/methods/edit.rb', line 34

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

#place_idInteger

Returns ID of the location where the user was tagged.

Returns:

  • (Integer)

    ID of the location where the user was tagged.



54
# File 'lib/vk/api/wall/methods/edit.rb', line 54

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

#post_idInteger

Returns Post ID.

Returns:

  • (Integer)

    Post ID.



36
# File 'lib/vk/api/wall/methods/edit.rb', line 36

attribute :post_id, API::Types::Coercible::Int

#publish_dateInteger

Returns (Applies only to a scheduled post.) Publication date (in Unix time). If used, posting will be delayed until the set time.

Returns:

  • (Integer)

    (Applies only to a scheduled post.) Publication date (in Unix time). If used, posting will be delayed until the set time.



48
# File 'lib/vk/api/wall/methods/edit.rb', line 48

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

#servicesString, 'facebook'

Returns (Applies only to a scheduled post.) List of services or websites where status will be updated, if the user has so requested. Sample values: 'twitter', 'facebook'.

Returns:

  • (String, 'facebook')

    (Applies only to a scheduled post.) List of services or websites where status will be updated, if the user has so requested. Sample values: 'twitter', 'facebook'.



44
# File 'lib/vk/api/wall/methods/edit.rb', line 44

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

#signedBoolean

Returns (Applies only to a post that was created "as community" on a community wall.); '1' — to add the signature of the user who created the post.

Returns:

  • (Boolean)

    (Applies only to a post that was created "as community" on a community wall.); '1' — to add the signature of the user who created the post



46
# File 'lib/vk/api/wall/methods/edit.rb', line 46

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