Class: Vk::API::Users::Methods::GetNearby

Inherits:
Schema::Method
  • Object
show all
Defined in:
lib/vk/api/users/methods/get_nearby.rb

Overview

Indexes current user location and returns nearby users.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Users::Methods::GetNearby

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :latitude (Number)

    geographic latitude of the place a user is located, in degrees (from -90 to 90)

  • :longitude (Number)

    geographic longitude of the place a user is located, in degrees (from -180 to 180)

  • :accuracy (Integer)

    current location accuracy in meters

  • :timeout (Integer)

    time when a user disappears from location search results, in seconds

  • :radius (Integer)

    search zone radius type (1 to 4); :* 1 – 300 m;; :* 2 – 2400 m;; :* 3 – 18 km;; :* 4 – 150 km.

  • :fields (Array)

    list of additional fields to return.; Available values: sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters, screen_name, maiden_name, timezone, occupation

  • :name_case (String)

    Case for declension of user name and surname: ; nom –nominative (default) ; gen – genitive ; dat – dative ; acc – accusative ; ins – instrumental ; abl – prepositional


# File 'lib/vk/api/users/methods/get_nearby.rb', line 15

Instance Method Details

#accuracyInteger

Returns current location accuracy in meters.

Returns:

  • (Integer)

    current location accuracy in meters


33
# File 'lib/vk/api/users/methods/get_nearby.rb', line 33

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

#fieldsArray

Returns list of additional fields to return.; Available values: sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters, screen_name, maiden_name, timezone, occupation.

Returns:

  • (Array)

    list of additional fields to return.; Available values: sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters, screen_name, maiden_name, timezone, occupation


39
# File 'lib/vk/api/users/methods/get_nearby.rb', line 39

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

#latitudeNumber

Returns geographic latitude of the place a user is located, in degrees (from -90 to 90).

Returns:

  • (Number)

    geographic latitude of the place a user is located, in degrees (from -90 to 90)


29
# File 'lib/vk/api/users/methods/get_nearby.rb', line 29

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

#longitudeNumber

Returns geographic longitude of the place a user is located, in degrees (from -180 to 180).

Returns:

  • (Number)

    geographic longitude of the place a user is located, in degrees (from -180 to 180)


31
# File 'lib/vk/api/users/methods/get_nearby.rb', line 31

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

#name_caseString

Returns Case for declension of user name and surname: ; nom –nominative (default) ; gen – genitive ; dat – dative ; acc – accusative ; ins – instrumental ; abl – prepositional.

Returns:

  • (String)

    Case for declension of user name and surname: ; nom –nominative (default) ; gen – genitive ; dat – dative ; acc – accusative ; ins – instrumental ; abl – prepositional


41
# File 'lib/vk/api/users/methods/get_nearby.rb', line 41

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

#radiusInteger

Returns search zone radius type (1 to 4); :* 1 – 300 m;; :* 2 – 2400 m;; :* 3 – 18 km;; :* 4 – 150 km.

Returns:

  • (Integer)

    search zone radius type (1 to 4); :* 1 – 300 m;; :* 2 – 2400 m;; :* 3 – 18 km;; :* 4 – 150 km.


37
# File 'lib/vk/api/users/methods/get_nearby.rb', line 37

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

#timeoutInteger

Returns time when a user disappears from location search results, in seconds.

Returns:

  • (Integer)

    time when a user disappears from location search results, in seconds


35
# File 'lib/vk/api/users/methods/get_nearby.rb', line 35

attribute :timeout, API::Types::Coercible::Int.optional.default(7200)