SuperEvilMegacorp / vainglory-assets

Community provided art, schemas, and other assets that make using the Vainglory API easier
https://developer.vainglorygame.com
MIT License
54 stars 40 forks source link

Bug: Queries with a negative timespans don't fail #250

Closed schneefux closed 7 years ago

schneefux commented 7 years ago

This request has createdAt-start 2017-06-01 and createdAt-end 2017-03-31:

curl -g "https://api.dc01.gamelockerapp.com/shards/eu/matches?filter[playerNames]=shutterfly&filter[gameMode]=casual_aral,blitz_pvp_ranked&sort=createdAt&filter[createdAt-start]=2017-06-01T00:00:00.000Z&filter[createdAt-end]=2017-03-31T23:59:99.999Z" -H "Authorization: Bearer $APIKEY" -H "X-TITLE-ID: semc-vainglory" -H "Accept: application/vnd.api+json"

The date range is more than 28 days, and end < start. It should fail with an error, but instead, it returns data from 2017-06-01 onwards.

svperfecta commented 7 years ago

Confirmed, this is a bug. Right now we check that it's < 28 days, but not also >0 days.

Low priority, but great find! This would make using the API a little confusing if someone misunderstood that startsAt should come BEFORE endsAt.

svperfecta commented 7 years ago

This issue was moved to gamelocker/platform#9