Class: HotsApi::Fetcher
- Inherits:
-
Object
- Object
- HotsApi::Fetcher
- Defined in:
- lib/hots_api/fetcher.rb
Constant Summary collapse
- ApiLimitReachedError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#last_response ⇒ Object
readonly
Returns the value of attribute last_response.
Instance Method Summary collapse
Instance Attribute Details
#last_response ⇒ Object (readonly)
Returns the value of attribute last_response.
9 10 11 |
# File 'lib/hots_api/fetcher.rb', line 9 def last_response @last_response end |
Instance Method Details
#get(path, params: {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/hots_api/fetcher.rb', line 11 def get(path, params: {}) do HTTP.get("#{base_path}/#{path}", params: params) end end |
#post(path, body: nil, file: nil) ⇒ Object
17 18 19 20 21 |
# File 'lib/hots_api/fetcher.rb', line 17 def post(path, body: nil, file: nil) do HTTP.post("#{base_path}/#{path}", (body: body, file: file)) end end |