Class: Vk::API::Places::Methods::Search

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

Overview

Returns a list of locations that match the search criteria.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :q (String)

    Search query string.

  • :city (Integer)

    City ID.

  • :latitude (Number)

    Geographical latitude of the initial search point, in degrees (from '-90' to '90').

  • :longitude (Number)

    Geographical longitude of the initial search point, in degrees (from '-180' to '180').

  • :radius (Integer)

    Radius of the search zone:; '1' — 100 m. (default); '2' — 800 m.; '3' — 6 km.; '4' — 50 km.

  • :offset (Integer)

    Offset needed to return a specific subset of locations.

  • :count (Integer)

    Number of locations to return.


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

Instance Method Details

#cityInteger

Returns City ID.

Returns:

  • (Integer)

    City ID.


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

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

#countInteger

Returns Number of locations to return.

Returns:

  • (Integer)

    Number of locations to return.


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

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

#latitudeNumber

Returns Geographical latitude of the initial search point, in degrees (from '-90' to '90').

Returns:

  • (Number)

    Geographical latitude of the initial search point, in degrees (from '-90' to '90').


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

attribute :latitude, API::Types::Coercible::Int

#longitudeNumber

Returns Geographical longitude of the initial search point, in degrees (from '-180' to '180').

Returns:

  • (Number)

    Geographical longitude of the initial search point, in degrees (from '-180' to '180').


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

attribute :longitude, API::Types::Coercible::Int

#offsetInteger

Returns Offset needed to return a specific subset of locations.

Returns:

  • (Integer)

    Offset needed to return a specific subset of locations.


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

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

#qString

Returns Search query string.

Returns:

  • (String)

    Search query string.


29
# File 'lib/vk/api/places/methods/search.rb', line 29

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

#radiusInteger

Returns Radius of the search zone:; '1' — 100 m. (default); '2' — 800 m.; '3' — 6 km.; '4' — 50 km.

Returns:

  • (Integer)

    Radius of the search zone:; '1' — 100 m. (default); '2' — 800 m.; '3' — 6 km.; '4' — 50 km.


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

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