Class: Etsy::BasicClient
- Inherits:
-
Object
- Object
- Etsy::BasicClient
- Defined in:
- lib/etsy/basic_client.rb
Overview
BasicClient
Used for calling public API methods.
Instance Method Summary collapse
-
#client ⇒ Object
:nodoc:.
-
#get(endpoint) ⇒ Object
Fetch a raw response from the specified endpoint.
-
#initialize(host) ⇒ BasicClient
constructor
Create a new client that will connect to the specified host.
Constructor Details
#initialize(host) ⇒ BasicClient
Create a new client that will connect to the specified host
11 12 13 |
# File 'lib/etsy/basic_client.rb', line 11 def initialize(host) @host = host end |
Instance Method Details
#client ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/etsy/basic_client.rb', line 15 def client # :nodoc: @client ||= Net::HTTP.new(@host) end |
#get(endpoint) ⇒ Object
Fetch a raw response from the specified endpoint
21 22 23 |
# File 'lib/etsy/basic_client.rb', line 21 def get(endpoint) client.get(endpoint) end |