Sha256: 811d872f6449b613f16e7b37083dd272cd68794d9fa17dc69fb50faf10421ff2
Contents?: true
Size: 700 Bytes
Versions: 2
Compression:
Stored size: 700 Bytes
Contents
require "date" require "json" require "net/http" require "time" require "trend/client" require "trend/version" module Trend class Error < StandardError; end def self.anomalies(*args) client.anomalies(*args) end def self.forecast(*args) client.forecast(*args) end def self.correlation(*args) client.correlation(*args) end def self.url @url ||= ENV["TREND_URL"] || "https://trendapi.org" end def self.url=(url) @url = url @client = nil end def self.api_key @api_key ||= ENV["TREND_API_KEY"] end def self.api_key=(api_key) @api_key = api_key @client = nil end # private def self.client @client ||= Client.new end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trend-0.1.2 | lib/trend.rb |
trend-0.1.1 | lib/trend.rb |