Helper function to check if the date was input correctly before returning a url to be called by the GET function. Also returns an error if the API called can only provide data for a specific date-time, and not date only.
parse_api_date(api, input_date = "", summary)
A url to be called by the API.
The api to be called, i.e. api = "environment/air-temperature"
Defaults to current (SGD) time. Format: YYYY-MM-DDTHH:MM:SS or YYYY-MM-DD
Returns an error if the user inputs a date only time when not supported by the API.