class Similarweb::Client
Attributes
api_key[RW]
http_client[RW]
Public Class Methods
new(args = {})
click to toggle source
# File lib/similarweb/client.rb, line 13 def initialize(args = {}) args.each do |key, value| send(:"#{key}=", value) end make_http_client! end
Private Instance Methods
make_http_client!()
click to toggle source
# File lib/similarweb/client.rb, line 22 def make_http_client! base_url = "http://api.similarweb.com/" self.http_client = Faraday.new(:url => base_url) do |builder| builder.request :url_encoded builder.response :follow_redirects, limit: 3 builder.adapter Faraday.default_adapter end end