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