feat(api): add like operators and additional filters (#4)

This commit is contained in:
paranarimasu
2021-07-11 16:32:18 -05:00
committed by GitHub
parent b31473292b
commit 2a2c86ac7d
15 changed files with 57 additions and 16 deletions
+19 -5
View File
@@ -408,35 +408,49 @@ NE
```sh
# This will match anime not of year 2000
/api/anime?filter[year][ne]=2000
```
```
LT
```sh
# This will match anime where the year is less than 2000
/api/anime?filter[year][lt]=2000
```
```
GT
```sh
# This will match anime where the year is greater than 2000
/api/anime?filter[year][gt]=2000
```
```
LTE
```sh
# This will match anime where the year is less than or equal to 2000
/api/anime?filter[year][lte]=2000
```
```
GTE
```sh
# This will match anime where the year is greater than 2000
/api/anime?filter[year][gte]=2000
```
```
LIKE
```sh
# This will match anime where the name matches the pattern '%monogatari%'
/api/anime?filter[name][like]=%monogatari%
```
NOT LIKE
```sh
# This will match anime where the name does not match the pattern '%monogatari%'
/api/anime?filter[name][notlike]=%monogatari%
```
If a comparison operator is not provided, the filter shall use the EQ operator.