Class: PushBot::Push
Instance Attribute Summary
Attributes inherited from Api
Instance Method Summary collapse
-
#notify(message, push_options = {}) ⇒ PushBot::Response
Push a new message to the Segment.
Methods inherited from Api
#batch?, #initialize, #token?, #user?
Constructor Details
This class inherits a constructor from PushBot::Api
Instance Method Details
#notify(message, push_options = {}) ⇒ PushBot::Response
Push a new message to the Segment
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/push_bot/push.rb', line 8 def notify(, ={}) = { :sound => '' } , type = .merge().merge( :msg => , :platform => platforms ), :all unless batch? type = :one [:badge] ||= '0' [:token] = token [:platform] = platform end Request.new(:push).post(type, ) end |