Class: Vk::API::Market

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/market/price.rb,
lib/vk/api/market/section.rb,
lib/vk/api/market/currency.rb,
lib/vk/api/market/market_item.rb,
lib/vk/api/market/methods/add.rb,
lib/vk/api/market/methods/get.rb,
lib/vk/api/market/market_album.rb,
lib/vk/api/market/methods/edit.rb,
lib/vk/api/market/methods/delete.rb,
lib/vk/api/market/methods/report.rb,
lib/vk/api/market/methods/search.rb,
lib/vk/api/market/market_category.rb,
lib/vk/api/market/methods/restore.rb,
lib/vk/api/market/market_item_full.rb,
lib/vk/api/market/methods/add_album.rb,
lib/vk/api/market/methods/get_by_id.rb,
lib/vk/api/market/methods/edit_album.rb,
lib/vk/api/market/methods/get_albums.rb,
lib/vk/api/market/methods/add_to_album.rb,
lib/vk/api/market/methods/delete_album.rb,
lib/vk/api/market/methods/edit_comment.rb,
lib/vk/api/market/methods/get_comments.rb,
lib/vk/api/market/methods/reorder_items.rb,
lib/vk/api/market/methods/create_comment.rb,
lib/vk/api/market/methods/delete_comment.rb,
lib/vk/api/market/methods/get_categories.rb,
lib/vk/api/market/methods/reorder_albums.rb,
lib/vk/api/market/methods/report_comment.rb,
lib/vk/api/market/responses/add_response.rb,
lib/vk/api/market/responses/get_response.rb,
lib/vk/api/market/methods/get_album_by_id.rb,
lib/vk/api/market/methods/restore_comment.rb,
lib/vk/api/market/responses/edit_response.rb,
lib/vk/api/market/methods/remove_from_album.rb,
lib/vk/api/market/responses/delete_response.rb,
lib/vk/api/market/responses/report_response.rb,
lib/vk/api/market/responses/search_response.rb,
lib/vk/api/market/responses/restore_response.rb,
lib/vk/api/market/responses/add_album_response.rb,
lib/vk/api/market/responses/get_by_id_response.rb,
lib/vk/api/market/responses/edit_album_response.rb,
lib/vk/api/market/responses/get_albums_response.rb,
lib/vk/api/market/responses/add_to_album_response.rb,
lib/vk/api/market/responses/delete_album_response.rb,
lib/vk/api/market/responses/edit_comment_response.rb,
lib/vk/api/market/responses/get_comments_response.rb,
lib/vk/api/market/responses/reorder_items_response.rb,
lib/vk/api/market/responses/create_comment_response.rb,
lib/vk/api/market/responses/delete_comment_response.rb,
lib/vk/api/market/responses/get_categories_response.rb,
lib/vk/api/market/responses/reorder_albums_response.rb,
lib/vk/api/market/responses/report_comment_response.rb,
lib/vk/api/market/responses/get_album_by_id_response.rb,
lib/vk/api/market/responses/restore_comment_response.rb,
lib/vk/api/market/responses/remove_from_album_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: Currency, MarketAlbum, MarketCategory, MarketItem, MarketItemFull, Price, Section

Instance Attribute Summary

Attributes inherited from Schema::Namespace

#client

DSL collapse

Methods inherited from Schema::Namespace

#call, #initialize

Constructor Details

This class inherits a constructor from Vk::Schema::Namespace

Instance Method Details

#add(arguments = {}) ⇒ Vk::API::Market::Responses::AddResponse

Returns Ads a new item to the market.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :name (String)

    Item name.

  • :description (String)

    Item description.

  • :category_id (Integer)

    Item category ID.

  • :price (Number)

    Item price.

  • :deleted (Boolean)

    Item status ('1' — deleted, '0' — not deleted).

  • :main_photo_id (Integer)

    Cover photo ID.

  • :photo_ids (Array)

    IDs of additional photos.

Returns:

See Also:


6309
6310
6311
6312
6313
6314
6315
# File 'lib/vk/api/methods.rb', line 6309

def add(arguments = {})
  require "vk/api/market/methods/add"
  method = Methods::Add.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/add_response"
  Responses::AddResponse.new(response.deep_symbolize_keys)
end

#add_album(arguments = {}) ⇒ Vk::API::Market::Responses::AddAlbumResponse

Returns Creates new collection of items.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :title (String)

    Collection title.

  • :photo_id (Integer)

    Cover photo ID.

  • :main_album (Boolean)

    Set as main ('1' – set, '0' – no).

Returns:

See Also:


6395
6396
6397
6398
6399
6400
6401
# File 'lib/vk/api/methods.rb', line 6395

def add_album(arguments = {})
  require "vk/api/market/methods/add_album"
  method = Methods::AddAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/add_album_response"
  Responses::AddAlbumResponse.new(response.deep_symbolize_keys)
end

#add_to_album(arguments = {}) ⇒ Vk::API::Market::Responses::AddToAlbumResponse

Returns Adds an item to one or multiple collections.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Item ID.

  • :album_ids (Array)

    Collections IDs to add item to.

Returns:

See Also:


6448
6449
6450
6451
6452
6453
6454
# File 'lib/vk/api/methods.rb', line 6448

def add_to_album(arguments = {})
  require "vk/api/market/methods/add_to_album"
  method = Methods::AddToAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/add_to_album_response"
  Responses::AddToAlbumResponse.new(response.deep_symbolize_keys)
end

#create_comment(arguments = {}) ⇒ Vk::API::Market::Responses::CreateCommentResponse

Returns Creates a new comment for an item.

Parameters:

  • arguments (Hash) (defaults to: {})

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.

Returns:

See Also:


6197
6198
6199
6200
6201
6202
6203
# File 'lib/vk/api/methods.rb', line 6197

def create_comment(arguments = {})
  require "vk/api/market/methods/create_comment"
  method = Methods::CreateComment.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/create_comment_response"
  Responses::CreateCommentResponse.new(response.deep_symbolize_keys)
end

#delete(arguments = {}) ⇒ Vk::API::Market::Responses::DeleteResponse

Returns Deletes an item.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Item ID.

Returns:

See Also:


6340
6341
6342
6343
6344
6345
6346
# File 'lib/vk/api/methods.rb', line 6340

def delete(arguments = {})
  require "vk/api/market/methods/delete"
  method = Methods::Delete.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/delete_response"
  Responses::DeleteResponse.new(response.deep_symbolize_keys)
end

#delete_album(arguments = {}) ⇒ Vk::API::Market::Responses::DeleteAlbumResponse

Returns Deletes a collection of items.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an collection owner community.

  • :album_id (Integer)

    Collection ID.

Returns:

See Also:


6422
6423
6424
6425
6426
6427
6428
# File 'lib/vk/api/methods.rb', line 6422

def delete_album(arguments = {})
  require "vk/api/market/methods/delete_album"
  method = Methods::DeleteAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/delete_album_response"
  Responses::DeleteAlbumResponse.new(response.deep_symbolize_keys)
end

#delete_comment(arguments = {}) ⇒ Vk::API::Market::Responses::DeleteCommentResponse

Returns Deletes an item's comment.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    identifier of an item owner community; "Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community "

  • :comment_id (Integer)

    comment id

Returns:

See Also:


6227
6228
6229
6230
6231
6232
6233
# File 'lib/vk/api/methods.rb', line 6227

def delete_comment(arguments = {})
  require "vk/api/market/methods/delete_comment"
  method = Methods::DeleteComment.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/delete_comment_response"
  Responses::DeleteCommentResponse.new(response.deep_symbolize_keys)
end

#edit(arguments = {}) ⇒ Vk::API::Market::Responses::EditResponse

Returns Edits an item.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Item ID.

  • :name (String)

    Item name.

  • :description (String)

    Item description.

  • :category_id (Integer)

    Item category ID.

  • :price (Number)

    Item price.

  • :deleted (Boolean)

    Item status ('1' — deleted, '0' — not deleted).

  • :main_photo_id (Integer)

    Cover photo ID.

  • :photo_ids (Array)

    IDs of additional photos.

Returns:

See Also:


6328
6329
6330
6331
6332
6333
6334
# File 'lib/vk/api/methods.rb', line 6328

def edit(arguments = {})
  require "vk/api/market/methods/edit"
  method = Methods::Edit.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/edit_response"
  Responses::EditResponse.new(response.deep_symbolize_keys)
end

#edit_album(arguments = {}) ⇒ Vk::API::Market::Responses::EditAlbumResponse

Returns Edits a collection of items.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an collection owner community.

  • :album_id (Integer)

    Collection ID.

  • :title (String)

    Collection title.

  • :photo_id (Integer)

    Cover photo id

  • :main_album (Boolean)

    Set as main ('1' – set, '0' – no).

Returns:

See Also:


6410
6411
6412
6413
6414
6415
6416
# File 'lib/vk/api/methods.rb', line 6410

def edit_album(arguments = {})
  require "vk/api/market/methods/edit_album"
  method = Methods::EditAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/edit_album_response"
  Responses::EditAlbumResponse.new(response.deep_symbolize_keys)
end

#edit_comment(arguments = {}) ⇒ Vk::API::Market::Responses::EditCommentResponse

Returns Chages item comment's text.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :comment_id (Integer)

    Comment ID.

  • :message (String)

    New comment text (required if 'attachments' are not specified); ; 2048 symbols maximum.

  • :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";

Returns:

See Also:


6253
6254
6255
6256
6257
6258
6259
# File 'lib/vk/api/methods.rb', line 6253

def edit_comment(arguments = {})
  require "vk/api/market/methods/edit_comment"
  method = Methods::EditComment.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/edit_comment_response"
  Responses::EditCommentResponse.new(response.deep_symbolize_keys)
end

#get(arguments = {}) ⇒ Vk::API::Market::Responses::GetResponse

Returns items list for a community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community; "Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community "

  • :count (Integer) — default: 100

    Number of items to return.

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :extended (Boolean)

    '1' – method will return additional fields: 'likes, can_comment, car_repost, photos'. These parameters are not returned by default.

Returns:

See Also:


6123
6124
6125
6126
6127
6128
6129
# File 'lib/vk/api/methods.rb', line 6123

def get(arguments = {})
  require "vk/api/market/methods/get"
  method = Methods::Get.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/get_response"
  Responses::GetResponse.new(response.deep_symbolize_keys)
end

#get_album_by_id(arguments = {}) ⇒ Vk::API::Market::Responses::GetAlbumByIdResponse

Returns items album's data

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    identifier of an album owner community; "Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community "

  • :album_ids (Array)

    collections identifiers to obtain data from

Returns:

See Also:


6179
6180
6181
6182
6183
6184
6185
# File 'lib/vk/api/methods.rb', line 6179

def get_album_by_id(arguments = {})
  require "vk/api/market/methods/get_album_by_id"
  method = Methods::GetAlbumById.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/get_album_by_id_response"
  Responses::GetAlbumByIdResponse.new(response.deep_symbolize_keys)
end

#get_albums(arguments = {}) ⇒ Vk::API::Market::Responses::GetAlbumsResponse

Returns community's collections list.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an items owner community.

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer) — default: 50

    Number of items to return.

Returns:

See Also:


6167
6168
6169
6170
6171
6172
6173
# File 'lib/vk/api/methods.rb', line 6167

def get_albums(arguments = {})
  require "vk/api/market/methods/get_albums"
  method = Methods::GetAlbums.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/get_albums_response"
  Responses::GetAlbumsResponse.new(response.deep_symbolize_keys)
end

#get_by_id(arguments = {}) ⇒ Vk::API::Market::Responses::GetByIdResponse

Returns information about market items by their ids.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :item_ids (Array)

    Comma-separated ids list: \$1user id\$1_\$1item id\$1.; If an item belongs to a community -\$1community id\$1 is used. ; " 'Videos' value example: ; '-4363_136089719,13245770_137352259'"

  • :extended (Boolean)

    '1' – to return additional fields: 'likes, can_comment, car_repost, photos'. By default: '0'.

Returns:

See Also:


6135
6136
6137
6138
6139
6140
6141
# File 'lib/vk/api/methods.rb', line 6135

def get_by_id(arguments = {})
  require "vk/api/market/methods/get_by_id"
  method = Methods::GetById.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/get_by_id_response"
  Responses::GetByIdResponse.new(response.deep_symbolize_keys)
end

#get_categories(arguments = {}) ⇒ Vk::API::Market::Responses::GetCategoriesResponse

Returns a list of market categories.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :count (Integer) — default: 10

    Number of results to return.

  • :offset (Integer)

    Offset needed to return a specific subset of results.

Returns:

See Also:


6278
6279
6280
6281
6282
6283
6284
# File 'lib/vk/api/methods.rb', line 6278

def get_categories(arguments = {})
  require "vk/api/market/methods/get_categories"
  method = Methods::GetCategories.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/get_categories_response"
  Responses::GetCategoriesResponse.new(response.deep_symbolize_keys)
end

#get_comments(arguments = {}) ⇒ Vk::API::Market::Responses::GetCommentsResponse

Returns comments list for an item.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community

  • :item_id (Integer)

    Item ID.

  • :need_likes (Boolean)

    '1' — to return likes info.

  • :start_comment_id (Integer)

    ID of a comment to start a list from (details below).

  • :count (Integer) — default: 20

    Number of results to return.

  • :sort (String) — default: "asc"

    Sort order ('asc' — from old to new, 'desc' — from new to old)

  • :extended (Boolean)

    '1' — comments will be returned as numbered objects, in addition lists of 'profiles' and 'groups' objects will be returned.

  • :fields (Array)

    List of additional profile fields to return. See the [vk.com/dev/fields|details]

Returns:

See Also:


6215
6216
6217
6218
6219
6220
6221
# File 'lib/vk/api/methods.rb', line 6215

def get_comments(arguments = {})
  require "vk/api/market/methods/get_comments"
  method = Methods::GetComments.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/get_comments_response"
  Responses::GetCommentsResponse.new(response.deep_symbolize_keys)
end

#remove_from_album(arguments = {}) ⇒ Vk::API::Market::Responses::RemoveFromAlbumResponse

Returns Removes an item from one or multiple collections.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Item ID.

  • :album_ids (Array)

    Collections IDs to remove item from.

Returns:

See Also:


6435
6436
6437
6438
6439
6440
6441
# File 'lib/vk/api/methods.rb', line 6435

def remove_from_album(arguments = {})
  require "vk/api/market/methods/remove_from_album"
  method = Methods::RemoveFromAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/remove_from_album_response"
  Responses::RemoveFromAlbumResponse.new(response.deep_symbolize_keys)
end

#reorder_albums(arguments = {}) ⇒ Vk::API::Market::Responses::ReorderAlbumsResponse

Returns Reorders the collections list.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :album_id (Integer)

    Collection ID.

  • :before (Integer)

    ID of a collection to place current collection before it.

  • :after (Integer)

    ID of a collection to place current collection after it.

Returns:

See Also:


6381
6382
6383
6384
6385
6386
6387
# File 'lib/vk/api/methods.rb', line 6381

def reorder_albums(arguments = {})
  require "vk/api/market/methods/reorder_albums"
  method = Methods::ReorderAlbums.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/reorder_albums_response"
  Responses::ReorderAlbumsResponse.new(response.deep_symbolize_keys)
end

#reorder_items(arguments = {}) ⇒ Vk::API::Market::Responses::ReorderItemsResponse

Returns Changes item place in a collection.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :album_id (Integer)

    ID of a collection to reorder items in. Set 0 to reorder full items list.

  • :item_id (Integer)

    Item ID.

  • :before (Integer)

    ID of an item to place current item before it.

  • :after (Integer)

    ID of an item to place current item after it.

Returns:

See Also:


6367
6368
6369
6370
6371
6372
6373
# File 'lib/vk/api/methods.rb', line 6367

def reorder_items(arguments = {})
  require "vk/api/market/methods/reorder_items"
  method = Methods::ReorderItems.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/reorder_items_response"
  Responses::ReorderItemsResponse.new(response.deep_symbolize_keys)
end

#report(arguments = {}) ⇒ Vk::API::Market::Responses::ReportResponse

Returns Sends a complaint to the item.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Item ID.

  • :reason (Integer)

    Complaint reason. Possible values:; *'0' — spam;; *'1' — child porn;; *'2' — extremism;; *'3' — violence;; *'4' — drugs propaganda;; *'5' — adult materials;; *'6' — insult.

Returns:

See Also:


6291
6292
6293
6294
6295
6296
6297
# File 'lib/vk/api/methods.rb', line 6291

def report(arguments = {})
  require "vk/api/market/methods/report"
  method = Methods::Report.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/report_response"
  Responses::ReportResponse.new(response.deep_symbolize_keys)
end

#report_comment(arguments = {}) ⇒ Vk::API::Market::Responses::ReportCommentResponse

Returns Sends a complaint to the item's comment.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :comment_id (Integer)

    Comment ID.

  • :reason (Integer)

    Complaint reason. Possible values:; *'0' — spam;; *'1' — child porn;; *'2' — extremism;; *'3' — violence;; *'4' — drugs propaganda;; *'5' — adult materials;; *'6' — insult.

Returns:

See Also:


6266
6267
6268
6269
6270
6271
6272
# File 'lib/vk/api/methods.rb', line 6266

def report_comment(arguments = {})
  require "vk/api/market/methods/report_comment"
  method = Methods::ReportComment.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/report_comment_response"
  Responses::ReportCommentResponse.new(response.deep_symbolize_keys)
end

#restore(arguments = {}) ⇒ Vk::API::Market::Responses::RestoreResponse

Returns Restores recently deleted item.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :item_id (Integer)

    Deleted item ID.

Returns:

See Also:


6352
6353
6354
6355
6356
6357
6358
# File 'lib/vk/api/methods.rb', line 6352

def restore(arguments = {})
  require "vk/api/market/methods/restore"
  method = Methods::Restore.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/restore_response"
  Responses::RestoreResponse.new(response.deep_symbolize_keys)
end

#restore_comment(arguments = {}) ⇒ Vk::API::Market::Responses::RestoreCommentResponse

Returns Restores a recently deleted comment.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    identifier of an item owner community; "Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community "

  • :comment_id (Integer)

    deleted comment id

Returns:

See Also:


6239
6240
6241
6242
6243
6244
6245
# File 'lib/vk/api/methods.rb', line 6239

def restore_comment(arguments = {})
  require "vk/api/market/methods/restore_comment"
  method = Methods::RestoreComment.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/restore_comment_response"
  Responses::RestoreCommentResponse.new(response.deep_symbolize_keys)
end

#search(arguments = {}) ⇒ Vk::API::Market::Responses::SearchResponse

Returns Searches market items in a community's catalog.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an items owner community.

  • :q (String)

    Search query, for example "pink slippers".

  • :price_from (Integer)

    Minimum item price value.

  • :price_to (Integer)

    Maximum item price value.

  • :tags (Array)

    Comma-separated tag IDs list.

  • :rev (Integer) — default: 1

    '0' — do not use reverse order, '1' — use reverse order

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer) — default: 20

    Number of items to return.

  • :extended (Boolean) — default: false

    '1' – to return additional fields: 'likes, can_comment, car_repost, photos'. By default: '0'.

Returns:

See Also:


6154
6155
6156
6157
6158
6159
6160
# File 'lib/vk/api/methods.rb', line 6154

def search(arguments = {})
  require "vk/api/market/methods/search"
  method = Methods::Search.new(arguments)
  response = method.call(@client)
  require "vk/api/market/responses/search_response"
  Responses::SearchResponse.new(response.deep_symbolize_keys)
end