def api_get(controller, action = nil, id = nil, params = {})
      uri = String.new

      if action && id
        uri = "/#{controller}/#{action}/#{id}"
      elsif action
        uri = "/#{controller}/#{action}/"
      else
        uri = "/#{controller}/"
      end

      response = self.connection.get(uri, params) do |request|
        request.headers['Content-Type'] = 'application/json'
        request.headers['Accept']       = 'application/json'
        request.headers['User-Agent']  = UserAgents[DefaultUserAgent]
      end

      case code = response.status.to_i
      when 400..499
        raise(Newegg::NeweggClientError, "error, #{code}: #{response.inspect}")
      when 500..599
        raise(Newegg::NeweggServerError, "error, #{code}: #{response.inspect}")
      else
        response
      end
    end
def api_get(controller, action = nil, id = nil, params = {})
      uri = String.new

      if action && id
        uri = "/#{controller}/#{action}/#{id}"
      elsif action
        uri = "/#{controller}/#{action}/"
      else
        uri = "/#{controller}/"
      end

      response = self.connection.get(uri, params) do |request|
        request.headers['Content-Type'] = 'application/json'
        request.headers['Accept']       = 'application/json'
        request.headers['User-Agent']  = UserAgents[DefaultUserAgent]
      end

      case code = response.status.to_i
      when 400..499
        raise(Newegg::NeweggClientError, "error, #{code}: #{response.inspect}")
      when 500..599
        raise(Newegg::NeweggServerError, "error, #{code}: #{response.inspect}")
      else
        response
      end
    end
GET: {controller}/{action}/{id}/

 @param [String] controller
 @param [optional, String] action
 @param [optional, String] id