Class: Rsift::Data

Inherits:
Model
  • Object
show all
Defined in:
lib/rsift/data.rb

Instance Method Summary collapse

Constructor Details

#initialize(url, key, username) ⇒ Data

Returns a new instance of Data.



6
7
8
9
# File 'lib/rsift/data.rb', line 6

def initialize(url, key, username)
  @format = "json"
  super(url, key, username)
end

Instance Method Details

#do(opts = {}) ⇒ Object



11
12
13
14
# File 'lib/rsift/data.rb', line 11

def do(opts = {})
  get("stream.#{@format}?&"+
      Rsift::escape_options(opts).join("&"))
end

#get(path) ⇒ Object



16
17
18
# File 'lib/rsift/data.rb', line 16

def get(path)
  @conn.get(path)
end