sabesp-mananciais-api
sabesp-mananciais-api copied to clipboard
[API] Add new endpoint with range between two dates
Description
- User need to set two dates and separate by "/" (2015-10-15/2015-10-16)
- The first param need to be lt than second (/2015-10-15/2015-10-16)
- If user set other params, show a error message
@wbruno
About validations:
Case 0. Default
- Return current status of Sabesp
Case 1. Select with Date
- Date format must be like YYYY-MM-DD;
- Date must be between 2003-01-01 until today;
- Return status about the specific date
Case 2. Range
- Date format must be like YYYY-MM-DD;
- Date must be between 2003-01-01 until today;
- The first date must be lower than the second
- Return status about the specific range
Possible routes
-
/range?from=YYYY-MM-DD&to=YYYY-MM-DD)
-
/range?begin=YYYY-MM-DD&end=YYYY-MM-DD
-
/range/YYYY-MM-DD/YYYY-MM-DD