lib/rumour-ruby/client.rb in rumour-ruby-0.0.8 vs lib/rumour-ruby/client.rb in rumour-ruby-0.1.0
- old
+ new
@@ -4,11 +4,11 @@
require 'forwardable'
module Rumour
class Client
include HTTParty
- base_uri 'rumour.herokuapp.com/api/v1'
+ base_uri '188.166.65.141/api/v1'
attr_accessor :access_token
def initialize(access_token = nil)
@access_token = access_token || Rumour.configuration.access_token
@@ -19,10 +19,10 @@
recipient = intercept_tm_recipient || recipient
post('/text_messages', text_message: { from: sender, recipient: recipient, body: body })
end
def send_push_notification(recipients, options= {})
- recipients = intercept_pn_recipients unless [intercept_pn_recipients].compact.empty?
+ recipients = intercept_pn_recipients unless [intercept_pn_recipients].flatten.compact.empty?
post('/push_notifications', push_notification: { recipients: [recipients].flatten }.merge(options))
end
private