Class: Vk::API::Users::Methods::Search

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

Overview

Returns a list of users matching the search criteria.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :q (String) —

    Search query string (e.g., 'Vasya Babich').

  • :sort (Integer) —

    Sort order:; '1' — by date registered; '0' — by rating

  • :offset (Integer) —

    Offset needed to return a specific subset of users.

  • :count (Integer) —

    Number of users to return.

  • :fields (Array, 'bdate') —

    Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online';

  • :city (Integer) —

    City ID.

  • :country (Integer) —

    Country ID.

  • :hometown (String) —

    City name in a string.

  • :university_country (Integer) —

    ID of the country where the user graduated.

  • :university (Integer) —

    ID of the institution of higher education.

  • :university_year (Integer) —

    Year of graduation from an institution of higher education.

  • :university_faculty (Integer) —

    Faculty ID.

  • :university_chair (Integer) —

    Chair ID.

  • :sex (Integer) —

    '1' — female; '2' — male; '0' — any (default)

  • :status (Integer) —

    Relationship status:; '1' — Not married; '2' — In a relationship; '3' — Engaged; '4' — Married; '5' — It's complicated; '6' — Actively searching; '7' — In love

  • :age_from (Integer) —

    Minimum age.

  • :age_to (Integer) —

    Maximum age.

  • :birth_day (Integer) —

    Day of birth.

  • :birth_month (Integer) —

    Month of birth.

  • :birth_year (Integer) —

    Year of birth.

  • :online (Boolean) —

    '1' — online only; '0' — all users

  • :has_photo (Boolean) —

    '1' — with photo only; '0' — all users

  • :school_country (Integer) —

    ID of the country where users finished school.

  • :school_city (Integer) —

    ID of the city where users finished school.

  • :school_class (Integer) —
  • :school (Integer) —

    ID of the school.

  • :school_year (Integer) —

    School graduation year.

  • :religion (String) —

    Users' religious affiliation.

  • :interests (String) —

    Users' interests.

  • :company (String) —

    Name of the company where users work.

  • :position (String) —

    Job position.

  • :group_id (Integer) —

    ID of a community to search in communities.

  • :from_list (Array) —


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

Instance Method Details

#age_from ⇒ Integer

Returns Minimum age.

Returns:

  • (Integer) —

    Minimum age.



85
# File 'lib/vk/api/users/methods/search.rb', line 85

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

#age_to ⇒ Integer

Returns Maximum age.

Returns:

  • (Integer) —

    Maximum age.



87
# File 'lib/vk/api/users/methods/search.rb', line 87

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

#birth_day ⇒ Integer

Returns Day of birth.

Returns:

  • (Integer) —

    Day of birth.



89
# File 'lib/vk/api/users/methods/search.rb', line 89

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

#birth_month ⇒ Integer

Returns Month of birth.

Returns:

  • (Integer) —

    Month of birth.



91
# File 'lib/vk/api/users/methods/search.rb', line 91

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

#birth_year ⇒ Integer

Returns Year of birth.

Returns:

  • (Integer) —

    Year of birth.



93
# File 'lib/vk/api/users/methods/search.rb', line 93

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

#city ⇒ Integer

Returns City ID.

Returns:

  • (Integer) —

    City ID.



65
# File 'lib/vk/api/users/methods/search.rb', line 65

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

#company ⇒ String

Returns Name of the company where users work.

Returns:

  • (String) —

    Name of the company where users work.



113
# File 'lib/vk/api/users/methods/search.rb', line 113

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

#count ⇒ Integer

Returns Number of users to return.

Returns:

  • (Integer) —

    Number of users to return.



61
# File 'lib/vk/api/users/methods/search.rb', line 61

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

#country ⇒ Integer

Returns Country ID.

Returns:

  • (Integer) —

    Country ID.



67
# File 'lib/vk/api/users/methods/search.rb', line 67

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

#fields ⇒ Array, 'bdate'

Returns Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online';.

Returns:

  • (Array, 'bdate') —

    Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online';



63
# File 'lib/vk/api/users/methods/search.rb', line 63

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

#from_list ⇒ Array



119
# File 'lib/vk/api/users/methods/search.rb', line 119

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

#group_id ⇒ Integer

Returns ID of a community to search in communities.

Returns:

  • (Integer) —

    ID of a community to search in communities.



117
# File 'lib/vk/api/users/methods/search.rb', line 117

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

#has_photo ⇒ Boolean

Returns '1' — with photo only; '0' — all users.

Returns:

  • (Boolean) —

    '1' — with photo only; '0' — all users



97
# File 'lib/vk/api/users/methods/search.rb', line 97

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

#hometown ⇒ String

Returns City name in a string.

Returns:

  • (String) —

    City name in a string.



69
# File 'lib/vk/api/users/methods/search.rb', line 69

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

#interests ⇒ String

Returns Users' interests.

Returns:

  • (String) —

    Users' interests.



111
# File 'lib/vk/api/users/methods/search.rb', line 111

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

#offset ⇒ Integer

Returns Offset needed to return a specific subset of users.

Returns:

  • (Integer) —

    Offset needed to return a specific subset of users.



59
# File 'lib/vk/api/users/methods/search.rb', line 59

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

#online ⇒ Boolean

Returns '1' — online only; '0' — all users.

Returns:

  • (Boolean) —

    '1' — online only; '0' — all users



95
# File 'lib/vk/api/users/methods/search.rb', line 95

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

#position ⇒ String

Returns Job position.

Returns:

  • (String) —

    Job position.



115
# File 'lib/vk/api/users/methods/search.rb', line 115

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

#q ⇒ String

Returns Search query string (e.g., 'Vasya Babich').

Returns:

  • (String) —

    Search query string (e.g., 'Vasya Babich').



55
# File 'lib/vk/api/users/methods/search.rb', line 55

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

#religion ⇒ String

Returns Users' religious affiliation.

Returns:

  • (String) —

    Users' religious affiliation.



109
# File 'lib/vk/api/users/methods/search.rb', line 109

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

#school ⇒ Integer

Returns ID of the school.

Returns:

  • (Integer) —

    ID of the school.



105
# File 'lib/vk/api/users/methods/search.rb', line 105

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

#school_city ⇒ Integer

Returns ID of the city where users finished school.

Returns:

  • (Integer) —

    ID of the city where users finished school.



101
# File 'lib/vk/api/users/methods/search.rb', line 101

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

#school_class ⇒ Integer



103
# File 'lib/vk/api/users/methods/search.rb', line 103

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

#school_country ⇒ Integer

Returns ID of the country where users finished school.

Returns:

  • (Integer) —

    ID of the country where users finished school.



99
# File 'lib/vk/api/users/methods/search.rb', line 99

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

#school_year ⇒ Integer

Returns School graduation year.

Returns:

  • (Integer) —

    School graduation year.



107
# File 'lib/vk/api/users/methods/search.rb', line 107

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

#sex ⇒ Integer

Returns '1' — female; '2' — male; '0' — any (default).

Returns:

  • (Integer) —

    '1' — female; '2' — male; '0' — any (default)



81
# File 'lib/vk/api/users/methods/search.rb', line 81

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

#sort ⇒ Integer

Returns Sort order:; '1' — by date registered; '0' — by rating.

Returns:

  • (Integer) —

    Sort order:; '1' — by date registered; '0' — by rating



57
# File 'lib/vk/api/users/methods/search.rb', line 57

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

#status ⇒ Integer

Returns Relationship status:; '1' — Not married; '2' — In a relationship; '3' — Engaged; '4' — Married; '5' — It's complicated; '6' — Actively searching; '7' — In love.

Returns:

  • (Integer) —

    Relationship status:; '1' — Not married; '2' — In a relationship; '3' — Engaged; '4' — Married; '5' — It's complicated; '6' — Actively searching; '7' — In love



83
# File 'lib/vk/api/users/methods/search.rb', line 83

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

#university ⇒ Integer

Returns ID of the institution of higher education.

Returns:

  • (Integer) —

    ID of the institution of higher education.



73
# File 'lib/vk/api/users/methods/search.rb', line 73

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

#university_chair ⇒ Integer

Returns Chair ID.

Returns:

  • (Integer) —

    Chair ID.



79
# File 'lib/vk/api/users/methods/search.rb', line 79

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

#university_country ⇒ Integer

Returns ID of the country where the user graduated.

Returns:

  • (Integer) —

    ID of the country where the user graduated.



71
# File 'lib/vk/api/users/methods/search.rb', line 71

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

#university_faculty ⇒ Integer

Returns Faculty ID.

Returns:

  • (Integer) —

    Faculty ID.



77
# File 'lib/vk/api/users/methods/search.rb', line 77

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

#university_year ⇒ Integer

Returns Year of graduation from an institution of higher education.

Returns:

  • (Integer) —

    Year of graduation from an institution of higher education.



75
# File 'lib/vk/api/users/methods/search.rb', line 75

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