Sha256: 438b6611d6fea0ff549ebb0d9325dda1a972bf849ea34195913c0c9268d1ae0e
Contents?: true
Size: 861 Bytes
Versions: 5
Compression:
Stored size: 861 Bytes
Contents
module AnswersEngine module Client class ScraperVar < AnswersEngine::Client::Base def find(scraper_name, var_name) self.class.get("/scrapers/#{scraper_name}/vars/#{var_name}", @options) end def all(scraper_name, opts={}) params = @options.merge opts self.class.get("/scrapers/#{scraper_name}/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}/vars/#{var_name}", params) end def unset(scraper_name, var_name, opts={}) params = @options.merge(opts) self.class.delete("/scrapers/#{scraper_name}/vars/#{var_name}", params) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems