Class: Vk::API::Market::Methods::Search

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

Overview

Searches market items in a community's catalog

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

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)

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

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer)

    Number of items to return.

  • :extended (Boolean)

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


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

Instance Method Details

#countInteger

Returns Number of items to return.

Returns:

  • (Integer)

    Number of items to return.


45
# File 'lib/vk/api/market/methods/search.rb', line 45

attribute :count, API::Types::Coercible::Int.optional.default(20)

#extendedBoolean

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

Returns:

  • (Boolean)

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


47
# File 'lib/vk/api/market/methods/search.rb', line 47

attribute :extended, API::Types::Form::Bool.optional.default(false)

#offsetInteger

Returns Offset needed to return a specific subset of results.

Returns:

  • (Integer)

    Offset needed to return a specific subset of results.


43
# File 'lib/vk/api/market/methods/search.rb', line 43

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

#owner_idInteger

Returns ID of an items owner community.

Returns:

  • (Integer)

    ID of an items owner community.


31
# File 'lib/vk/api/market/methods/search.rb', line 31

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

#price_fromInteger

Returns Minimum item price value.

Returns:

  • (Integer)

    Minimum item price value.


35
# File 'lib/vk/api/market/methods/search.rb', line 35

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

#price_toInteger

Returns Maximum item price value.

Returns:

  • (Integer)

    Maximum item price value.


37
# File 'lib/vk/api/market/methods/search.rb', line 37

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

#qString

Returns Search query, for example "pink slippers".

Returns:

  • (String)

    Search query, for example "pink slippers".


33
# File 'lib/vk/api/market/methods/search.rb', line 33

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

#revInteger

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

Returns:

  • (Integer)

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


41
# File 'lib/vk/api/market/methods/search.rb', line 41

attribute :rev, API::Types::Coercible::Int.enum(0, 1).optional.default(1)

#tagsArray

Returns Comma-separated tag IDs list.

Returns:

  • (Array)

    Comma-separated tag IDs list.


39
# File 'lib/vk/api/market/methods/search.rb', line 39

attribute :tags, API::Types::Coercible::Array.member(API::Types::Coercible::Int).optional.default(nil)