class Mailgun::Client

def endpoint_generator(api_host, api_version, ssl)

Returns:
  • (string) - concatenated URL string

Parameters:
  • ssl (Boolean) -- True, SSL. False, No SSL.
  • api_version (String) -- The version of the API to hit
  • api_host (String) -- URL endpoint the library will hit
def endpoint_generator(api_host, api_version, ssl)
  ssl ? scheme = 'https' : scheme = 'http'
  if api_version
    "#{scheme}://#{api_host}/#{api_version}"
  else
    "#{scheme}://#{api_host}"
  end
end