me method
Future<MyRank>
me(
- String leaderboardId, {
- LeaderboardPeriod period = LeaderboardPeriod.current,
- String? segment,
The current user's rank, score, pending count, gap to the next rank and
period end (rank null while unranked). Cached for 60 s.
Implementation
Future<MyRank> me(String leaderboardId,
{LeaderboardPeriod period = LeaderboardPeriod.current, String? segment}) async {
_requireId(leaderboardId, 'leaderboard_id');
final j = await _client.call(
feature: ClikgateFeatures.leaderboards,
method: 'GET',
path: _path(leaderboardId, '/me'),
query: {'period': period.value, if (segment != null) 'segment': segment},
needsUser: true,
cacheable: true,
);
return MyRank.fromJson(j);
}