main.rb
##
# Makes a /connections GET request to the Transport Opendata API.
# All parameters are mandatory.
Makes a /connections GET request to the Transport Opendata API.
All parameters are mandatory.
Makes a / connections GET request to the Transport Opendata API . All parameters are mandatory .
def doConnectionsRequest(_params)
  definedParams = ["from","to"]
  parm = _params.length > 0 ? _params : {"from" => "Neuchatel","to" => "Bern"}
  if hasAllParams(parm, definedParams)
    url = TRANSPORT_EP + "/connections?" + URI.encode_www_form(parm)
    return forwardRequest(url)
  else
    return doError('Request does not contain the correct parameters ('+definedParams.join(",")+')')
  end
end
def doConnectionsRequest ( _params ) definedParams = [ "from" , "to" ] parm = _params . length > 0 ? _params : { "from" => "Neuchatel" , "to" => "Bern" } if hasAllParams ( parm , definedParams ) url = TRANSPORT_EP + "/connections?" + URI . encode_www_form ( parm ) return forwardRequest ( url ) else return doError ( 'Request does not contain the correct parameters (' + definedParams . join ( "," ) + ')' ) end end
Makes a /connections GET request to the Transport Opendata API.
Makes a / connections GET request to the Transport Opendata API .
_params
<not_specific>