Sha256: 56644cb7f6a0dc01778afffd876171c7c1d4d0538a5315901dad0b9a41b41ce2
Contents?: true
Size: 641 Bytes
Versions: 5
Compression:
Stored size: 641 Bytes
Contents
require 'faraday' require 'memoist' module EveOnline class Base extend Memoist def url raise NotImplementedError end def user_agent "EveOnline API (https://github.com/biow0lf/eve_online) v#{ VERSION }" end def content faraday = Faraday.new faraday.headers[:user_agent] = user_agent faraday.options.timeout = 60 faraday.options.open_timeout = 60 faraday.get(url).body rescue Faraday::TimeoutError raise EveOnline::Exceptions::TimeoutException end memoize :content def response parser.parse(content) end memoize :response end end
Version data entries
5 entries across 5 versions & 1 rubygems