Sha256: a0454fc01103698464e7f1b251c40cc4497fff942af917641a554a14cf4cbb94
Contents?: true
Size: 622 Bytes
Versions: 6
Compression:
Stored size: 622 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
6 entries across 6 versions & 1 rubygems