def request(endpoint, method='get', file=nil, params={})
      method = method.downcase
      if file
        self.send("post_file", endpoint, file)
      else
        if endpoint[0] == '/'
          endpoint[0] = ''
        end
        # Work around to delete the leading slash on the request endpoint
        # Currently the module we're using appends a slash to the base url
        # so an additional url will break the request.
        # Refer to ...faraday/connection.rb L#404
        self.send("#{method}_request", endpoint, params)
      end
    end
def request(endpoint, method='get', file=nil, params={})
      method = method.downcase
      if file
        self.send("post_file", endpoint, file)
      else
        if endpoint[0] == '/'
          endpoint[0] = ''
        end
        # Work around to delete the leading slash on the request endpoint
        # Currently the module we're using appends a slash to the base url
        # so an additional url will break the request.
        # Refer to ...faraday/connection.rb L#404
        self.send("#{method}_request", endpoint, params)
      end
    end
Connect to the PokitDok API with the specified Client ID and Client
 Secret.

 +client_id+     your client ID, provided by PokitDok
 +client_secret+ your client secret, provided by PokitDok
 +version+ The API version that should be used for requests.  Defaults to the latest version.
 +base+ The base URL to use for API requests.  Defaults to https://platform.pokitdok.com

  TODO: Make it simpler to pass in params out of order (also so you don't have to do init(..., nil, nil, nil, param))


 ******************************
 General Use APIs
 ******************************

 Invokes the the general request method for submitting API request.

 +endpoint+ the API request path
 +method+ the http request method that should be used
 +file+ file when the API accepts file uploads as input
 +params+ an optional Hash of parameters

 NOTE: There might be a better way of achieving the seperation of get/get_request
 but currently using the "send" method will go down the ancestor chain until the correct
 method is found. In this case the 'httpMethod'_request