Module: Vk::DSL::Users
- Included in:
- Vk::DSL
- Defined in:
- lib/vk/dsl/users.rb
Instance Method Summary collapse
-
#app_user?(user_id) ⇒ Boolean
Have user installed app?.
- #get_me ⇒ Vk::User
- #get_user(user_id, options = {}) ⇒ Vk::User
- #get_users(user_ids, options = {}) ⇒ Object
Instance Method Details
#app_user?(user_id) ⇒ Boolean
Have user installed app?
10 11 12 |
# File 'lib/vk/dsl/users.rb', line 10 def app_user?(user_id) request('users.isAppUser', user_id: user_id) == '1' end |
#get_me ⇒ Vk::User
29 30 31 |
# File 'lib/vk/dsl/users.rb', line 29 def get_me @me ||= Vk::User.new(request('users.get').first) end |
#get_user(user_id, options = {}) ⇒ Vk::User
24 25 26 |
# File 'lib/vk/dsl/users.rb', line 24 def get_user(user_id, = {}) get_users(user_id, ).first end |