gitfrosh / lotr-api

This repository holds the code base of the API to rule them all, the Lord of the Rings api, which provides you with book, character, movie and quotes data.
https://the-one-api.dev
238 stars 66 forks source link

Add documentation examples for filtering expressions #21

Closed alexgQQ closed 3 years ago

alexgQQ commented 3 years ago

Hello again 👋

Glad you found use from the filtering functionality in my previous PR . This just adds some example uses for the filtering in the docs application you have. Let me know your thoughts when you get a chance.

I'd be curious on your thoughts of some nested filtering functionality too. With this current setup, you can filter on direct values for the requested data model. A neat feature would be something like /quotes?character_name='Gandalf'. It would take some hacking, we'd need to figure some functions to cast it (https://github.com/leodinas-hao/mongoose-query-parser#add-custom-casting-functions) but if it would be useful we can give it a shot

Happy #hacktoberfest 🎉

gitfrosh commented 3 years ago

Hi there, thanks again for your contribution, really great! I added some minor changes and will merge your PR. Let's definitely have a look into nested filtering functionality! Feel free to open a PR whenever you like. Cheers 🍾