sabesp-mananciais-api icon indicating copy to clipboard operation
sabesp-mananciais-api copied to clipboard

[API] Add new endpoint with range between two dates

Open rafaell-lycan opened this issue 9 years ago • 1 comments

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

rafaell-lycan avatar Apr 18 '15 02:04 rafaell-lycan

@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

rafaell-lycan avatar Aug 28 '15 04:08 rafaell-lycan