Expiry parameter in tournament record list

Unity documentation for ListTournamentRecords describes an expiry parameter. But the current description is far from being a complete information why this parameter exists and how to use it. It requires server code inspection to learn that expire parameter acts as a pointer to an exact iteration of leaderboard for a given tournament. The value of this “pointer” is inherited from tournament reset and endTime configuration, thus it is not obvious what exactly should be used as value. But you must provide exact value because in database, records are stored under composite key that contains tournament identifier and expires at, so passing the current timestamp or a timestamp in the future as an expiry does not work. Since we are not using tournament reset feature we simply put endActive value as expiry. It also be valuable to add explanation why and when to use expiry field. The surprise was that even if you don’t use the tournament reset function, you won’t be able to display the tournament record after the tournament has ended without providing this field.

1 Like

@jlisicki-ccgames thank you for the feedback, we will look to explain this particular parameter better in our documentation.