lib/blurb/snapshot.rb in blurb-0.2.3 vs lib/blurb/snapshot.rb in blurb-0.3.0

- old
+ new

@@ -8,11 +8,11 @@ PRODUCT_ADS = "productAds" TARGETS = "targets" SPONSORED_PRODUCTS = "sp" SPONSORED_BRANDS = "hsa" - def self.create(params = {}, opts = {}) + def create(params = {}, opts = {}) # required argument checks raise ArgumentError.new("params hash must contain a recordType") unless params["recordType"] # Default State Filter if no params passed in state_filter = params["stateFilter"] || "enabled,paused" @@ -23,14 +23,14 @@ post_request("/v2/#{campaign_type}/#{params["recordType"]}/snapshot", { "stateFilter" => state_filter }) end - def self.status(snapshot_id, opts = {}) + def status(snapshot_id, opts = {}) get_request("/v2/snapshots/#{snapshot_id}") end - def self.download(location, opts = {}) + def download(location, opts = {}) opts.merge!({:full_path => true, :gzip => true, :no_token => true}) get_request(location, opts) end end end