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_fromInteger

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_toInteger

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_dayInteger

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_monthInteger

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_yearInteger

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)

#cityInteger

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)

#companyString

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)

#countInteger

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)

#countryInteger

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)

#fieldsArray, '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_listArray



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_idInteger

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_photoBoolean

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)

#hometownString

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)

#interestsString

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)

#offsetInteger

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)

#onlineBoolean

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)

#positionString

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)

#qString

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)

#religionString

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)

#schoolInteger

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_cityInteger

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_classInteger



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

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

#school_countryInteger

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_yearInteger

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)

#sexInteger

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)

#sortInteger

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)

#statusInteger

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)

#universityInteger

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_chairInteger

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_countryInteger

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_facultyInteger

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_yearInteger

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)