Class: Singly::Http
Class Method Summary collapse
Methods included from Logger
Class Method Details
.base_url ⇒ Object
6 7 8 |
# File 'lib/singly/http.rb', line 6 def base_url "https://api.singly.com/#{Singly.version}" end |
.fetch(path, options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/singly/http.rb', line 10 def fetch(path, ={}) log("#{path} with #{}") response = Typhoeus::Request.new("#{base_url}#{path}", ).run validate_response(response) parse_response(response) end |