Sha256: f5fdda9a9a2a0a0d7763b7f56397dba83f8d4d4b3af0b4363a1dab0373615638
Contents?: true
Size: 324 Bytes
Versions: 2
Compression:
Stored size: 324 Bytes
Contents
require 'nico/message' require 'yajl/http_stream' module Nico class Listener def initialize(id, token) @url = "http://#{token}:x@streaming.campfirenow.com/room/#{id}/live.json" end def each Yajl::HttpStream.get(URI.parse @url) do |json| yield Message.new(json) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nico-0.1.0 | lib/nico/room/listener.rb |
nico-0.0.2 | lib/nico/room/listener.rb |