Class: Jaconda::Notification
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- Jaconda::Notification
- Defined in:
- lib/jaconda/notification.rb
Class Method Summary collapse
Class Method Details
.authenticate(options) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/jaconda/notification.rb', line 6 def self.authenticate() self.site = "https://#{[:subdomain]}.jaconda.im" @room_id = [:room_id] self.user = [:room_token] self.password = "x" end |
.notify(params = {}) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/jaconda/notification.rb', line 13 def self.notify(params = {}) = {:room_id => @room_id} headers = {"Content-Type"=>"application/x-www-form-urlencoded"} body = CGI.unescape({message: params}.to_query) connection.post(custom_method_collection_url(:notify, ), body, headers) end |