Class: Viglink::HTTPClient
- Inherits:
-
Object
- Object
- Viglink::HTTPClient
- Includes:
- HTTParty
- Defined in:
- lib/viglink/http_client.rb
Class Method Summary collapse
Class Method Details
.get(path:, query: {}) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/viglink/http_client.rb', line 13 def self.get(path:, query: {}) response = super(path, query: query) unless response.success? raise Viglink::APIError.new(status: response.code, body: response.body) end response end |