def request(method, path, options, headers, raw)
        headers.merge!({
          'User-Agent' => user_agent
        })
        
        options.merge!({
          :client_id     => client_id,
          :client_secret => client_secret
        })
        
        options.merge!({
          :v => Time.now.strftime('%Y%m%d')
        })
        
        begin
          response = connection.request(method, paramify(path, options), headers)
        rescue OAuth2::Error => e
          Skittles::Utils.handle_foursquare_error(e.response)
        else
          Skittles::Error
        end
        
        unless raw
          result = Skittles::Utils.parse_json(response.body)
        end
        
        raw ? response : result.response
      end
def request(method, path, options, headers, raw)
        headers.merge!({
          'User-Agent' => user_agent
        })
        
        options.merge!({
          :client_id     => client_id,
          :client_secret => client_secret
        })
        
        options.merge!({
          :v => Time.now.strftime('%Y%m%d')
        })
        
        begin
          response = connection.request(method, paramify(path, options), headers)
        rescue OAuth2::Error => e
          Skittles::Utils.handle_foursquare_error(e.response)
        else
          Skittles::Error
        end
        
        unless raw
          result = Skittles::Utils.parse_json(response.body)
        end
        
        raw ? response : result.response
      end
Perform an HTTP request