Class: Apis::Client
- Inherits:
-
Object
- Object
- Apis::Client
- Defined in:
- lib/apis/client.rb
Overview
Client for the Apis API
Constant Summary collapse
- URL_PREFIX =
Apis.is url prefix
'http://apis.is'
Instance Method Summary collapse
-
#agent ⇒ Faraday::Connection
Apis.is Farafay Connection.
-
#get(path) ⇒ Faraday::Response
Make a HTTP GET request.
Instance Method Details
#agent ⇒ Faraday::Connection
Apis.is Farafay Connection
15 16 17 18 19 20 |
# 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) ⇒ Faraday::Response
Make a HTTP GET request
26 27 28 |
# File 'lib/apis/client.rb', line 26 def get(path) agent.get(path).body end |