I’m developing my own script that communicates with Clash Royal API for managing my clan on CW2 - it’s personal content, no public or Royale API competition! heh I’m trying to know, per day, if my clan members completed all the four war battles.
How can I filter for war battles? I know there’s two types of war that is returning, but somehow I think I’m getting non-war battles on those battle types. I understand I need to divide cards on duel per 8, to know how many games happened on that duel. But as I said, I’m struggling to filter war games only.
if you want to know what modes your members have played.
In order to ensure that you have all the battles played by the players, you should make a request for each player every hour. In order to not trigger any potential rate limits, you should space out your requests (i.e. don’t parallel fetch 1000 requests in a second)
God damn. I’m sorry I’ve wasted your time.
I’ve got all that information by querying API, but I was getting strange results. Everything was what I was filtering. Everything.
That’s when I’ve realized that I was trying to compare (I’m using Powershell) with “=” and in PowerShell the logical comp. operator is “-eq”. I was not even using “==” to not look bad on the picture. My bad.
With postman, you don’t need to worry about your command line syntax, and you can save your api keys inside a collection. So you can easily add endpoints without having to worry about copying your keys all the time.
Plus it will format the JSON returned in a human readable way automatically. Or allow you to save the responses for local testing. There are too many features to mention and it’s indispensable for development.