Sha256: dd566e56612bf66e5da73e25ef8c79ecbd8c54f8d86b6ca6945f4c32e756857e
Contents?: true
Size: 900 Bytes
Versions: 58
Compression:
Stored size: 900 Bytes
Contents
module Datahen module Client class ScraperJobVar < Datahen::Client::Base def find(scraper_name, var_name) self.class.get("/scrapers/#{scraper_name}/current_job/vars/#{var_name}", @options) end def all(scraper_name, opts={}) params = @options.merge opts self.class.get("/scrapers/#{scraper_name}/current_job/vars", params) end def set(scraper_name, var_name, value, opts={}) body = {} body[:value] = value body[:secret] = opts[:secret] if opts[:secret] params = @options.merge({body: body.to_json}) self.class.put("/scrapers/#{scraper_name}/current_job/vars/#{var_name}", params) end def unset(scraper_name, var_name, opts={}) params = @options.merge(opts) self.class.delete("/scrapers/#{scraper_name}/current_job/vars/#{var_name}", params) end end end end
Version data entries
58 entries across 58 versions & 1 rubygems