fenya123 / forum123

Flask application written for educational purposes.
http://193.124.115.171/
1 stars 1 forks source link

Add filtering to get topics REST endpoint #124

Closed birthdaysgift closed 1 year ago

birthdaysgift commented 1 year ago

We need to add filtration to the get_topics REST route. Filter should be possible by the following attributes: author_id, created_before, created_after.

Request example

GET /topics?author_id=42&author_id=24&author_id=18

Response example

[
    # topics with author_id 42 or 24 or 18
]

We suppose that all datetime related query params will be sent in UTC timezone in the following format:

'2023-04-24 05:10:20.782336'

Request example

GET /topics?created_after=2023-04-24 04:10:20.782336&created_before=2023-04-24 05:10:20.782336

So in the scope of this task we need to add filtration for get_topics route.

birthdaysgift commented 1 year ago

Check reqparse docs to find a way to parse lists from query parameters.