Class: Vk::API::Groups::Methods::Search

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

Overview

Returns a list of communities matching the search criteria.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :q (String)

    Search query string.

  • :type (String)

    Community type. Possible values: 'group, page, event.'

  • :country_id (Integer)

    Country ID.

  • :city_id (Integer)

    City ID. If this parameter is transmitted, country_id is ignored.

  • :future (Boolean)

    '1' — to return only upcoming events. Works with the 'type' = 'event' only.

  • :market (Boolean)

    '1' — to return communities with enabled market only.

  • :sort (Integer)

    Sort order. Possible values:; *'0' — default sorting (similar the full version of the site);; *'1' — by growth speed;; *'2'— by the "day attendance/members number" ratio;; *'3' — by the "Likes number/members number" ratio;; *'4' — by the "comments number/members number" ratio;; *'5' — by the "boards entries number/members number" ratio.; ;

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer)

    Number of communities to return.; "Note that you can not receive more than first thousand of results, regardless of 'count' and 'offset' values."



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

Instance Method Details

#city_idInteger

Returns City ID. If this parameter is transmitted, country_id is ignored.

Returns:

  • (Integer)

    City ID. If this parameter is transmitted, country_id is ignored.



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

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

#countInteger

Returns Number of communities to return.; "Note that you can not receive more than first thousand of results, regardless of 'count' and 'offset' values.".

Returns:

  • (Integer)

    Number of communities to return.; "Note that you can not receive more than first thousand of results, regardless of 'count' and 'offset' values."



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

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

#country_idInteger

Returns Country ID.

Returns:

  • (Integer)

    Country ID.



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

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

#futureBoolean

Returns '1' — to return only upcoming events. Works with the 'type' = 'event' only.

Returns:

  • (Boolean)

    '1' — to return only upcoming events. Works with the 'type' = 'event' only.



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

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

#marketBoolean

Returns '1' — to return communities with enabled market only.

Returns:

  • (Boolean)

    '1' — to return communities with enabled market only.



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

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

#offsetInteger

Returns Offset needed to return a specific subset of results.

Returns:

  • (Integer)

    Offset needed to return a specific subset of results.



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

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

#qString

Returns Search query string.

Returns:

  • (String)

    Search query string.



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

attribute :q, API::Types::Coercible::String

#sortInteger

Returns Sort order. Possible values:; *'0' — default sorting (similar the full version of the site);; *'1' — by growth speed;; *'2'— by the "day attendance/members number" ratio;; *'3' — by the "Likes number/members number" ratio;; *'4' — by the "comments number/members number" ratio;; *'5' — by the "boards entries number/members number" ratio.; ;.

Returns:

  • (Integer)

    Sort order. Possible values:; *'0' — default sorting (similar the full version of the site);; *'1' — by growth speed;; *'2'— by the "day attendance/members number" ratio;; *'3' — by the "Likes number/members number" ratio;; *'4' — by the "comments number/members number" ratio;; *'5' — by the "boards entries number/members number" ratio.; ;



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

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

#typeString

Returns Community type. Possible values: 'group, page, event.'.

Returns:

  • (String)

    Community type. Possible values: 'group, page, event.'



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

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