Module: RubyVibe::Calls::Info

Included in:
RubyVibe::Calls
Defined in:
lib/ruby_vibe/calls/info.rb

Instance Method Summary collapse

Instance Method Details

#get_account_dataObject



5
6
7
# File 'lib/ruby_vibe/calls/info.rb', line 5

def 
  client.action(RubyVibe::URLS::GET_ACCOUNT_INFO)
end

#get_online(ids = []) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/ruby_vibe/calls/info.rb', line 28

def get_online(ids=[])
  payload = {
    ids: ids
  }
  
  client.action(RubyVibe::URLS::GET_ONLINE, payload: payload)
end

#get_user_details(user_id) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/ruby_vibe/calls/info.rb', line 20

def get_user_details(user_id)
  payload = {
    id: user_id
  }

  client.action(RubyVibe::URLS::GET_USER_DETAILS, payload: payload)
end

#set_webhook(url, events: [], send_name: true, send_photo: true) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/ruby_vibe/calls/info.rb', line 9

def set_webhook(url, events: [], send_name: true, send_photo: true)
  payload = {
    url: url,
    event_types: events,
    send_name: send_name,
    send_photo: send_photo
  }

  client.action(RubyVibe::URLS::SET_WEBHOOK, payload: payload)
end