parse_api_date {datagovsgR} | R Documentation |
ParseApiDate
Description
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.
Usage
parse_api_date(api, input_date = "", summary)
Arguments
api |
The api to be called, i.e. api = "environment/air-temperature" |
input_date |
Defaults to current (SGD) time. Format: YYYY-MM-DDTHH:MM:SS or YYYY-MM-DD |
summary |
Returns an error if the user inputs a date only time when not supported by the API. |
Value
A url to be called by the API.
[Package datagovsgR version 1.0.1 Index]