Module: PusherNotification
- Defined in:
- lib/pusher_notifications_ruby.rb
Constant Summary collapse
- VERSION =
'0.20'.freeze
- INTERESTS_MAX_LENGTH =
164
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/pusher_notifications_ruby.rb', line 9 def config @config end |
Class Method Details
.publish(payload = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pusher_notifications_ruby.rb', line 11 def publish(payload = {}) validate_payload(payload) Faraday.post( base_url + path, payload.to_json, { 'Content-Type' => 'application/json', 'Authorization' => "Bearer #{config[:secret]}" } ) end |