Module: PushbulletRuby::API::Chats
- Included in:
- PushbulletRuby::API
- Defined in:
- lib/pushbullet_ruby/api/chats.rb
Instance Method Summary collapse
- #chats ⇒ Object
- #create_chat(params: {}) ⇒ Object
- #delete_chat(chat_id: nil) ⇒ Object
- #update_chat(chat_id: nil, params: {}) ⇒ Object
Instance Method Details
#chats ⇒ Object
4 5 6 |
# File 'lib/pushbullet_ruby/api/chats.rb', line 4 def chats PushbulletRuby::Chat.from_response(get('/v2/chats')) end |
#create_chat(params: {}) ⇒ Object
8 9 10 |
# File 'lib/pushbullet_ruby/api/chats.rb', line 8 def create_chat(params: {}) PushbulletRuby::Chat.new(post('/v2/chats', params).body) end |
#delete_chat(chat_id: nil) ⇒ Object
12 13 14 |
# File 'lib/pushbullet_ruby/api/chats.rb', line 12 def delete_chat(chat_id: nil) delete("/v2/chats/#{chat_id}").body end |
#update_chat(chat_id: nil, params: {}) ⇒ Object
16 17 18 |
# File 'lib/pushbullet_ruby/api/chats.rb', line 16 def update_chat(chat_id: nil, params: {}) PushbulletRuby::Chat.new(post("/v2/chats/#{chat_id}", params).body) end |