main.rb
##
# Makes a /stationboard GET request to the Transport Opendata API.
# Either (station) or (id) is mandatory.
Makes a /stationboard GET request to the Transport Opendata API.
Either (station) or (id) is mandatory.
Makes a / stationboard GET request to the Transport Opendata API . Either ( station ) or ( id ) is mandatory .
def doStationboardRequest(_params)
  definedParams = ["station","id"]
  parm = _params.length > 0 ? _params : {"station" => "Neuchatel"}
  if hasOneParam(parm, definedParams) 
    url = TRANSPORT_EP + "/stationboard?" + URI.encode_www_form(parm)
    return forwardRequest(url)
  else
    return doError('Request does not contain one of the correct parameters ('+definedParams.join(",")+')')
  end
end
def doStationboardRequest ( _params ) definedParams = [ "station" , "id" ] parm = _params . length > 0 ? _params : { "station" => "Neuchatel" } if hasOneParam ( parm , definedParams ) url = TRANSPORT_EP + "/stationboard?" + URI . encode_www_form ( parm ) return forwardRequest ( url ) else return doError ( 'Request does not contain one of the correct parameters (' + definedParams . join ( "," ) + ')' ) end end
Makes a /stationboard GET request to the Transport Opendata API.
Makes a / stationboard GET request to the Transport Opendata API .
_params
<not_specific>