Module: PusherNotification
- Defined in:
- lib/pusher_notifications_ruby.rb
Constant Summary collapse
- VERSION =
'0.22'.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.
10 11 12 |
# File 'lib/pusher_notifications_ruby.rb', line 10 def config @config end |
Class Method Details
.publish(payload = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pusher_notifications_ruby.rb', line 12 def publish(payload = {}) validate_payload(payload) Faraday.post( base_url + path, payload.to_json, { 'Content-Type' => 'application/json', 'Authorization' => "Bearer #{config[:secret_key]}" } ) end |