Sha256: a1cd50be3aaf34cb83eb6a67675ba5429af01a6e0050eb5c7b841cd7c3a73c27
Contents?: true
Size: 528 Bytes
Versions: 3
Compression:
Stored size: 528 Bytes
Contents
require 'json' module Gecko module Pusher module Channel class Base def initialize(widget_key) @widget_key = widget_key end protected def _push(data) payload = { api_key: Gecko::Pusher.api_key, data: data } Gecko::Pusher.connection.post do |req| req.url "/v1/send/#{@widget_key}" req.body = payload.to_json end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gecko-pusher-0.0.3 | lib/gecko-pusher/channel/base.rb |
gecko-pusher-0.0.2 | lib/gecko-pusher/channel/base.rb |
gecko-pusher-0.0.1 | lib/gecko-pusher/channel/base.rb |