Skip to content

Search Items

Priyadarshini Saha requested to merge 73-create-endpoints-for-search into main

Description

Search items in:

  1. particular list by list id
  2. For all items owned by user

Issue

Issue 73

Feature

  • Searching items by item title or item description from a specified list or for all lists owned by user

Tophatting

Postman Collection - see screenshots section

Expected current behavior

  • For a given search pattern, it will return the items in a list as long as the item title or item description contains the search pattern at some position

Changes

  1. Search Items in a list endpoint
  • Endpoint: http://localhost:8000/todo-item/search?pattern=:pattern&list_id=:listId
  • Request Params:
    • pattern: String
    • list_id: Long
  1. Search all items from multiple lists for a user
  • Endpoint: http://localhost:8000/todo-item/search-all?pattern=:pattern&user_id=:userId
  • Request Params:
    • pattern: String
    • user_id: Long

Screenshots

  1. Search items in a list endpoint Screenshot_2022-11-24_at_7.42.02_PM

  2. Search all items for a user Screenshot_2022-11-24_at_8.40.55_PM

Design Patterns

REST API design

Deviations

None

Additional

  • Unit test written
  • Meets requirements
  • Cross-browser tested
  • Added/updated documentation as needed
  • Camel case style used

Closes #73 (closed)

Edited by Priyadarshini Saha

Merge request reports