def api(path, args = {}, verb = "get", options = {}, &error_checking_block)
      # If a access token is explicitly provided, use that
      # This is explicitly needed in batch requests so GraphCollection
      # results preserve any specific access tokens provided
      args["access_token"] ||= self.access_token ||= Strava::Api::V3::Configuration::DEFAULT_ACCESS_TOKEN

      # Translate any arrays in the params into comma-separated strings
      args = sanitize_request_parameters(args)

      # add a leading /
      path = "/#{path}" unless path =~ /^\//

      # make the request via the provided service
      result = HTTMultiParty.public_send(verb, "#{Strava::Api::V3::Configuration::DEFAULT_ENDPOINT}#{path}", :query => args)

      if result.code.to_i >= 500
        raise Strava::Api::V3::ServerError.new(result.code.to_i, result.body)
      end

      yield result if error_checking_block

      # if we want a component other than the body (e.g. redirect header for images), return that
      if component = options[:http_component]
        component == :response ? result : result.send(options[:http_component])
      else
        # parse the body as JSON and run it through the error checker (if provided)
        # Note: Facebook sometimes sends results like "true" and "false", which aren't strictly objects
        # and cause MultiJson.load to fail -- so we account for that by wrapping the result in []
        MultiJson.load("[#{result.body.to_s}]")[0]
      end
    end
def api(path, args = {}, verb = "get", options = {}, &error_checking_block)
      # If a access token is explicitly provided, use that
      # This is explicitly needed in batch requests so GraphCollection
      # results preserve any specific access tokens provided
      args["access_token"] ||= self.access_token ||= Strava::Api::V3::Configuration::DEFAULT_ACCESS_TOKEN

      # Translate any arrays in the params into comma-separated strings
      args = sanitize_request_parameters(args)

      # add a leading /
      path = "/#{path}" unless path =~ /^\//

      # make the request via the provided service
      result = HTTMultiParty.public_send(verb, "#{Strava::Api::V3::Configuration::DEFAULT_ENDPOINT}#{path}", :query => args)

      if result.code.to_i >= 500
        raise Strava::Api::V3::ServerError.new(result.code.to_i, result.body)
      end

      yield result if error_checking_block

      # if we want a component other than the body (e.g. redirect header for images), return that
      if component = options[:http_component]
        component == :response ? result : result.send(options[:http_component])
      else
        # parse the body as JSON and run it through the error checker (if provided)
        # Note: Facebook sometimes sends results like "true" and "false", which aren't strictly objects
        # and cause MultiJson.load to fail -- so we account for that by wrapping the result in []
        MultiJson.load("[#{result.body.to_s}]")[0]
      end
    end
Makes a request to the appropriate Facebook API.
 @note You'll rarely need to call this method directly.

 @see GraphAPIMethods#graph_call
 @see RestAPIMethods#rest_call

 @param path the server path for this request (leading / is prepended if not present)
 @param args arguments to be sent to Facebook
 @param verb the HTTP method to use
 @param options request-related options, currently unused
 @param error_checking_block a block to evaluate the response status for additional JSON-encoded errors

 @yield The response for evaluation

 @raise [Strava::Api::V3::ServerError] if Strava returns an error (response status >= 500)

 @return the body of the response from Strava