Class: Kokkai::Client
- Inherits:
-
Object
- Object
- Kokkai::Client
- Includes:
- ApiMethods
- Defined in:
- lib/kokkai/client.rb
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #kokkai_connection ⇒ Object
- #send_get(path, params = nil) ⇒ Object
- #send_request(method, path, params = nil) ⇒ Object
Methods included from ApiMethods
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
9 10 |
# File 'lib/kokkai/client.rb', line 9 def initialize end |
Instance Method Details
#kokkai_connection ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/kokkai/client.rb', line 21 def kokkai_connection @kokkai_connection ||= Faraday.new() do |c| c.request :url_encoded c.response :xml, :content_type => /\bxml$/ c.adapter Faraday.default_adapter c..params_encoder = ParamsEncoder end end |
#send_get(path, params = nil) ⇒ Object
12 13 14 |
# File 'lib/kokkai/client.rb', line 12 def send_get(path, params = nil) send_request(:get, path, params) end |