wkambale / missingpersons

This is a possible list of Ugandans who might get arrested, detained, kidnapped, or go missing following the planned #March2Parliament protests on July 23, 2024
https://missingpersonsug.org
MIT License
23 stars 38 forks source link

Add Filtering, Sorting and Pagination to the Victim API #103

Open ssmusoke opened 1 month ago

ssmusoke commented 1 month ago

This enhancement simplifies the work for the UI

  1. 50 records will be returned per page
  2. Sorting will be by field, sent as a request parameter for example sort=name which sorts in ascending order, adding a '-' sorts in descending order e.g., sort=-name
  3. Filtering is done by an array /users?filter[status]=Remanded&filter[holding_location_id]=1
  4. To change the number of records in the page use the per_page query parameter e.g., per_page=25
davidofug commented 1 month ago

Do we have the API repo somewhere?

It could help to contribute to the documentation in real time.

ssmusoke commented 1 month ago

https://github.com/Uganda-Open-Data/missingpersons

skapeyi commented 1 month ago

@davidofug are you able to look into adding this https://github.com/DarkaOnLine/L5-Swagger. @ssmusoke thoughts?

ssmusoke commented 1 month ago

That would be a welcome addition, in the mean time here is a quick and dirty documentation of the API - https://github.com/Uganda-Open-Data/missingpersons/pull/16