class Apis::Client

Client for the Apis API

@see docs.apis.is/

Constants

URL_PREFIX

Apis.is url prefix

Public Instance Methods

agent() click to toggle source

Apis.is Farafay Connection

@return [Faraday::Connection]

# File lib/apis/client.rb, line 15
def agent
  Faraday.new(URL_PREFIX) do |fara|
    fara.use Apis::Response::FeedParser
    fara.adapter Faraday.default_adapter
  end
end
get(path) click to toggle source

Make a HTTP GET request

@param url [String] The path, relative to the url prefix @return [Faraday::Response]

# File lib/apis/client.rb, line 26
def get(path)
  agent.get(path).body
end