Sha256: e89e5455c167d08f997c2fe2b1a604f26155cfa226494191d287df8e35ae8e6a
Contents?: true
Size: 602 Bytes
Versions: 5
Compression:
Stored size: 602 Bytes
Contents
module YouGotListed class Client include HTTParty format :xml base_uri "https://www.yougotlistings.com/api" attr_accessor :api_key def initialize(api_key) self.class.default_params :key => api_key end def perform_request(http_method, path, params = {}) begin self.class.send(http_method, path, :query => params) rescue Timeout::Error {"YGLResponse" => {"responseCode" => "996", "Error" => "Timeout"}} rescue Exception {"YGLResponse" => {"responseCode" => "999", "Error" => "Unknown Error"}} end end end end
Version data entries
5 entries across 5 versions & 1 rubygems