Open svperfecta opened 7 years ago
I agree with this. In fact, I hate the way the page limit feels "random".
The genesis of the page limit, is that its a requirement for us to ensure that we make it hard (ideally impossible) for anyone to scrape the entire database. This comes from SEMC, and everyone will find that this is incredibly common. Some numbers (like MAU) are private and protected in order to help the game company grow and fund the game.
In any case, the limit was put in place for that reason. However, its possible to get more, if you include a filter (like playerName) which works here for tournaments too.
The fact that the limit changes is really strange, and constantly bits me when I'm working locally too.
Ideally I'd like to just set the limit globally to 10.
From @schneefux on May 5, 2017 17:27
I understand SEMC's concern. But I also think that the tournament shards are a special case, because every match there is public anyways — via Evil 8 streams and so on. Means that the size of the user base can't be private there, because everyone knows who plays there. An application that analyses Evil 8 must mirror the whole shard for that interval, because every single match matters — unlike the main shards where samples suffice.
I am okay with the limit on other shards, but on tournament, it is annoying.
This is still annoying, and I don't know what to do here. We should discuss ideas.
From @Skillz4Killz on August 7, 2017 21:42
I may have misunderstood the utility of web hooks but can't we use webhooks to solve this? I mean when I read the docs about the webhooks I first imagined using it for the Tournament shards. Create a webhook for each tournament shard on Saturdays and Sundays and get live updates as soon as the matches are done. We would essentially have every match pulled for the entire tournament shards once its set up no?
From @schneefux on August 8, 2017 6:14
Webhooks are a technology for a completely different use case. I want to achieve the tournament shard.
Blocked until we come up with a solution.
@schneefux still want to find a solution to this, but rather than add a hack on a hack, we want to remove the playerName restriction. Any thoughts on a way to do this but still deliver on SEMCs requirement? I'll think about this one too.
From @schneefux on April 29, 2017 12:9
Relevant curl (credits to genexp):
curl -g --request GET --url 'https://api.dc01.gamelockerapp.com/shards/tournament-na/matches?page[limit]=50&filter[createdAt-start]=2017-01-01T00:00:00Z' --header 'accept: application/json' --header 'authorization: Bearer <token>' --header 'x-title-id: semc-vainglory' | jq ".data|length"
returns 5 matches, not 50. Since there are not many matches played on the Tournament shard (I would assume), it would be efficient for us application developers to be able to download matches from one day directly via
/matches
- instead of going viafilter[playerNames]
which is harder to automate.Copied from original issue: gamelocker/vainglory#158