class Streak::Box
Public Class Methods
all(pipeline_key=nil, params={})
click to toggle source
# File lib/streak/box.rb, line 3 def self.all(pipeline_key=nil, params={}) path = pipeline_key ? "/pipelines/#{pipeline_key}/boxes" : "/boxes" res = Streak.request(:get, path, params) convert_to_streak_object(res, Box) end
create(pipeline_key, params={})
click to toggle source
# File lib/streak/box.rb, line 14 def self.create(pipeline_key, params={}) res = Streak.request(:put, "/pipelines/#{pipeline_key}/boxes", params) convert_to_streak_object(res, Box) end
find(key)
click to toggle source
# File lib/streak/box.rb, line 9 def self.find(key) res = Streak.request(:get, "/boxes/#{key}") convert_to_streak_object(res, Box) end
update(key, params)
click to toggle source
# File lib/streak/box.rb, line 19 def self.update(key, params) res = Streak.request(:post, "/boxes/#{key}", MultiJson.dump(params)) convert_to_streak_object(res, Box) end