Filtering by tag for TodoItem
Description
Creating REST endpoints for filtering by:
- priority
- tag
- completed
- flagged
- start date
- end date
Issue
Feature
- Added GET endpoints for filtering by priority, tag, flagged, completed, today, tomorrow
Tophatting
- Use postman for to-batting
Expected current behavior
- Call the following endpoints and receive a list of Todo Items Endpoints:
- Filter By Priority
- Endpoint:
localhost:8000/todo-item/filter-priority?priority=priority&list_id=id
- Query Params:
-
priority
: Enum (HIGH
,MEDIUM
,LOW
) -
list_id
: Long
-
- Response: List of todo items based on specified priority from a given list
- Filter By Tag
- Endpoint:
localhost:8000/todo-item/filter-tag?tag=tag&list_id=id
- Query Params:
-
tag
: String -
list_id
: Long
-
- Response: List of todo items based on specified tag from a given list
- Note: Pattern Matching based on 'tag' contained in any position
- Filter By Flagged
- Endpoint:
localhost:8000/todo-item/filter-flagged?flagged=flagged&list_id=id
- Query Params:
-
flagged
: Boolean -
list_id
: Long
-
- Response: List of todo items which are flagged from given todo list
- Filter by Completed
- Endpoint:
localhost:8000/todo-item/filter-completed?completed=completed&list_id=id
- Query Params:
-
completed
: Boolean -
list_id
: Long
-
- Response: List of todo items which are completed from given todo list
- Filter By Start Date
- Endpoint:
localhost:8000/todo-item/filter-start-date?date=date&list_id=id
- Query Params:
-
date
: String (format = "YY-MM-DD"
) -
list_id
: Long
-
- Response: List of todo items which have specified start date
- For Today: Pass in today's date to receive all items that have a start date of today
- Filter By End Date
- Endpoint:
localhost:8000/todo-item/filter-end-date?date=date&list_id=id
- Query Params:
-
date
: String (format = "YY-MM-DD"
) -
list_id
: Long
-
- Response: List of todo items which have specified end date
- For Today: Pass in today's date to receive all items that have a start end of today
Changes
- Endpoint for Filter by priority, tag, flagged, completed, start date, end date
Screenshots
Filter by Priority
Filter by Tag
Filter by Flagged
Filter by Completed
Filter by Start Date
Filter By End Date
Design Patterns
None
Deviations
Were there any deviations from the original design or architecture plan. If yes, what were they ?
Additional
-
Unit test written -
Meets requirements -
Cross-browser tested -
Added/updated documentation as needed -
Camel case style used
Closes #65 (closed)
Edited by Priyadarshini Saha