Closed cedmax closed 5 years ago
Not sure where you got the full stop from.
From docs:
client.games({
filters: {
'release_dates.date-gt': '2010-12-31',
'release_dates.date-lt': '2012-01-01'
},
limit: 5,
offset: 0,
order: 'release_dates.date:desc',
search: 'zelda'
}, [
'name',
'release_dates.date',
'rating',
'hypes',
'cover'
]).then(log);
So your code should be...
await client.games({
fields: "*",
order: "aggregated_rating:desc",
filters: {
"aggregated_rating_count-gt": 10,
},
})
🤦♂️ I think I got confused by the nested property .date-gt
, thanks
I hope this is not a duplicate: I checked the closed issues related to filtering but none of them seems to be exactly what I'm looking for.
I'm trying to query sorting by aggregated_rating, but filtering whatever games has less than 10 reviews.
I tried this
but the endpoint hit was
https://api-endpoint.igdb.com/games/?fields=*&order=aggregated_rating:desc&filter[aggregated_rating_count.gt]=10
and the filter didn't get applied as it should havefilter[aggregated_rating_count][gt]=10
for it to work as expected.I couldn't find any way to make it happen but changing my filters to
which is rather ugly. Am I missing something?