gpg::LeaderboardManager

#include <leaderboard_manager.h>

获取和设置各种与排行榜相关的数据。

摘要

公共类型

FetchAllCallback typedef
std::function< void(const FetchAllResponse &)>
定义一个 FetchAllResponse 类型的回调。
FetchAllScoreSummariesCallback typedef
std::function< void(const FetchAllScoreSummariesResponse &)>
定义一个 FetchAllScoreSummariesResponse 类型的回调。
FetchCallback typedef
std::function< void(const FetchResponse &)>
定义接收 FetchResponse 的回调类型。
FetchScorePageCallback typedef
std::function< void(const FetchScorePageResponse &)>
定义一个 ScorePageResponse 类型的回调。
FetchScoreSummaryCallback typedef
std::function< void(const FetchScoreSummaryResponse &)>
定义一个 FetchScoreSummaryResponse 类型的回调。
ShowAllUICallback typedef
std::function< void(const UIStatus &)>
定义接收 UIStatus 的回调类型。
ShowUICallback typedef
std::function< void(const UIStatus &)>
定义接收 UIStatus 的回调类型。

公共函数

Fetch(const std::string & leaderboard_id, FetchCallback callback)
void
异步加载当前已登录玩家的排行榜数据。
Fetch(DataSource data_source, const std::string & leaderboard_id, FetchCallback callback)
void
异步加载当前已登录玩家的排行榜数据。
FetchAll(FetchAllCallback callback)
void
异步加载当前已登录玩家的所有排行榜的数据。
FetchAll(DataSource data_source, FetchAllCallback callback)
void
异步加载当前已登录玩家的所有排行榜的数据。
FetchAllBlocking()
同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse
FetchAllBlocking(DataSource data_source)
同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse
FetchAllBlocking(Timeout timeout)
同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse
FetchAllBlocking(DataSource data_source, Timeout timeout)
同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse
FetchAllScoreSummaries(const std::string & leaderboard_id, FetchAllScoreSummariesCallback callback)
void
异步提取特定排行榜的所有得分摘要。
FetchAllScoreSummaries(DataSource data_source, const std::string & leaderboard_id, FetchAllScoreSummariesCallback callback)
void
异步提取特定排行榜的所有得分摘要。
FetchAllScoreSummariesBlocking(const std::string & leaderboard_id)
同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse
FetchAllScoreSummariesBlocking(DataSource data_source, const std::string & leaderboard_id)
同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse
FetchAllScoreSummariesBlocking(Timeout timeout, const std::string & leaderboard_id)
同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse
FetchAllScoreSummariesBlocking(DataSource data_source, Timeout timeout, const std::string & leaderboard_id)
同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse
FetchBlocking(const std::string & leaderboard_id)
同步加载当前已登录玩家的排行榜数据,直接返回 FetchResponse
FetchBlocking(DataSource data_source, const std::string & leaderboard_id)
同步加载当前已登录玩家的排行榜数据,直接返回 FetchResponse
FetchBlocking(Timeout timeout, const std::string & leaderboard_id)
同步加载当前已登录玩家的排行榜数据,直接返回 FetchResponse
FetchBlocking(DataSource data_source, Timeout timeout, const std::string & leaderboard_id)
同步加载当前已登录玩家的排行榜数据。
FetchScorePage(const ScorePage::ScorePageToken & token, FetchScorePageCallback callback)
void
异步返回由得分页面令牌标识的得分页面的数据。
FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken & token, FetchScorePageCallback callback)
void
异步返回由得分页面令牌标识的得分页面的数据。
FetchScorePage(const ScorePage::ScorePageToken & token, uint32_t max_results, FetchScorePageCallback callback)
void
异步返回由得分页面令牌标识的得分页面的数据。
FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken & token, uint32_t max_results, FetchScorePageCallback callback)
void
异步返回由得分页面令牌标识的得分页面的数据。
FetchScorePageBlocking(const ScorePage::ScorePageToken & token)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(DataSource data_source, const ScorePage::ScorePageToken & token)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(Timeout timeout, const ScorePage::ScorePageToken & token)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(const ScorePage::ScorePageToken & token, uint32_t max_results)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken & token)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(DataSource data_source, const ScorePage::ScorePageToken & token, uint32_t max_results)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(Timeout timeout, const ScorePage::ScorePageToken & token, uint32_t max_results)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken & token, uint32_t max_results)
同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse
FetchScoreSummary(const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection, FetchScoreSummaryCallback callback)
void
异步提取特定排行榜得分摘要的所有数据,该摘要包括指定排行榜的集合和时间范围。
FetchScoreSummary(DataSource data_source, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection, FetchScoreSummaryCallback callback)
void
异步提取特定排行榜得分摘要的所有数据,该摘要包括指定排行榜的集合和时间范围。
FetchScoreSummaryBlocking(const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse
FetchScoreSummaryBlocking(DataSource data_source, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse
FetchScoreSummaryBlocking(Timeout timeout, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse
FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string & leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection collection)
同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse
ScorePageToken(const std::string & leaderboard_id, LeaderboardStart start, LeaderboardTimeSpan time_span, LeaderboardCollection collection) const
获取特定排行榜的得分页面令牌,从得分或玩家开始,并涵盖特定时间范围和集合。
ShowAllUI(ShowAllUICallback callback)
void
向用户显示一个显示所有排行榜相关信息的界面。
ShowAllUI()
void
已弃用。 首选 ShowAllUI(ShowAllUICallback callback)。向用户显示一个显示所有排行榜相关信息的界面。界面在所有平台上异步显示。
ShowAllUIBlocking()
向用户显示一个显示所有排行榜相关信息的界面。
ShowAllUIBlocking(Timeout timeout)
向用户显示一个显示所有排行榜相关信息的界面。
ShowUI(const std::string & leaderboard_id, ShowUICallback callback)
void
向用户显示显示特定排行榜相关信息的界面。
ShowUI(const std::string & leaderboard_id, LeaderboardTimeSpan time_span, ShowUICallback callback)
void
向用户显示显示特定排行榜相关信息的界面。
ShowUI(const std::string & leaderboard_id)
void
已弃用。 首选 ShowUI(ShowUICallback 回调)。向用户显示显示特定排行榜相关信息的界面。界面在所有平台上异步显示。
ShowUIBlocking(const std::string & leaderboard_id)
向用户显示显示特定排行榜相关信息的界面。
ShowUIBlocking(const std::string & leaderboard_id, LeaderboardTimeSpan time_span)
向用户显示显示特定排行榜相关信息的界面。
ShowUIBlocking(Timeout timeout, const std::string & leaderboard_id)
向用户显示显示特定排行榜相关信息的界面。
ShowUIBlocking(Timeout timeout, const std::string & leaderboard_id, LeaderboardTimeSpan time_span)
向用户显示显示特定排行榜相关信息的界面。
SubmitScore(const std::string & leaderboard_id, uint64_t score)
void
将当前登录玩家的得分提交到排行榜。
SubmitScore(const std::string & leaderboard_id, uint64_t score, const std::string & metadata)
void
针对当前登录的玩家,提交与特定 ID 和元数据相关联的排行榜得分(例如玩家获得得分的操作)。

结构体

gpg::LeaderboardManager::FetchAllResponse

包含所有排行榜的数据和响应状态。

gpg::LeaderboardManager::FetchAllScoreSummariesResponse

包含所有排行榜得分摘要的所有数据和响应状态。

gpg::LeaderboardManager::FetchResponse

保存排行榜的数据以及回复状态。

gpg::LeaderboardManager::FetchScorePageResponse

返回所访问得分页面的响应状态和数据。

gpg::LeaderboardManager::FetchScoreSummaryResponse

指定排行榜得分摘要的数据和响应状态。

公共类型

FetchAllCallback

std::function< void(const FetchAllResponse &)> FetchAllCallback

定义一个 FetchAllResponse 类型的回调。

FetchAllScoreSummariesCallback

std::function< void(const FetchAllScoreSummariesResponse &)> FetchAllScoreSummariesCallback

定义一个 FetchAllScoreSummariesResponse 类型的回调。

FetchCallback

std::function< void(const FetchResponse &)> FetchCallback

定义接收 FetchResponse 的回调类型。

此回调类型会提供给以下 Fetch(*) 函数。

FetchScorePageCallback

std::function< void(const FetchScorePageResponse &)> FetchScorePageCallback

定义一个 ScorePageResponse 类型的回调。

FetchScoreSummaryCallback

std::function< void(const FetchScoreSummaryResponse &)> FetchScoreSummaryCallback

定义一个 FetchScoreSummaryResponse 类型的回调。

ShowAllUICallback

std::function< void(const UIStatus &)> ShowAllUICallback

定义接收 UIStatus 的回调类型。

此回调类型会提供给下面的 ShowAllUI* 函数。

ShowUICallback

std::function< void(const UIStatus &)> ShowUICallback

定义接收 UIStatus 的回调类型。

此回调类型会提供给下面的 ShowUI* 函数。

公共函数

提取

void Fetch(
  const std::string & leaderboard_id,
  FetchCallback callback
)

异步加载当前已登录玩家的排行榜数据。

在操作完成时调用提供的 FetchCallback。如果未指定 data_source,则此函数调用等同于调用 Fetch(DataSource data_source, const std::string& leaderboard_id, FetchCallback callback),并将 DataSource 指定为 CACHE_OR_NETWORK。

提取

void Fetch(
  DataSource data_source,
  const std::string & leaderboard_id,
  FetchCallback callback
)

异步加载当前已登录玩家的排行榜数据。

在操作完成时调用提供的 FetchCallback。将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。

FetchAll

void FetchAll(
  FetchAllCallback callback
)

异步加载当前已登录玩家的所有排行榜的数据。

如果未指定 data_source,则此函数调用等同于调用 FetchAll(DataSource data_source, FetchAllCallback callback),并将 data_source 指定为 CACHE_OR_NETWORK。

FetchAll

void FetchAll(
  DataSource data_source,
  FetchAllCallback callback
)

异步加载当前已登录玩家的所有排行榜的数据。

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。

FetchAllBlocking

FetchAllResponse FetchAllBlocking()

同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse

如果既未指定 data_source 也未指定超时,则此函数调用等同于调用 FetchAllResponse FetchAllBlocking(DataSource data_source、超时超时),data_source 应指定为 CACHE_OR_NETWORK,超时被指定为 10 年。

FetchAllBlocking

FetchAllResponse FetchAllBlocking(
  DataSource data_source
)

同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。如果未指定超时值,此函数调用等同于调用 FetchAllResponseFetchAllBlocking(DataSource data_source, Timeout timeout),使用指定的 data_source 值,并将超时指定为 10 年。

FetchAllBlocking

FetchAllResponse FetchAllBlocking(
  Timeout timeout
)

同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse

将超时指定为任意毫秒数。如果不指定 data_source,则此函数调用等同于调用 FetchAllResponseFetchAllBlocking(DataSource data_source, Timeout timeout),其中 data_source 被指定为 CACHE_OR_NETWORK 且超时包含您指定的值。

FetchAllBlocking

FetchAllResponse FetchAllBlocking(
  DataSource data_source,
  Timeout timeout
)

同步加载当前已登录玩家的所有排行榜的数据,直接返回 FetchAllResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。将超时指定为任意毫秒数。

FetchAllScoreSummaries

void FetchAllScoreSummaries(
  const std::string & leaderboard_id,
  FetchAllScoreSummariesCallback callback
)

异步提取特定排行榜的所有得分摘要。

如果未指定 data_source,则此函数调用等同于 FetchAllScoreSummaries(DataSource data_source, const std::string& leaderboard_id, FetchAllScoreSummariesCallback callback),并将 data_source 指定为 CACHE_OR_NETWORK。

FetchAllScoreSummaries

void FetchAllScoreSummaries(
  DataSource data_source,
  const std::string & leaderboard_id,
  FetchAllScoreSummariesCallback callback
)

异步提取特定排行榜的所有得分摘要。

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  const std::string & leaderboard_id
)

同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse

如果未指定 data_source 和超时,此函数调用等同于 FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking( DataSource data_source, const std::string& leaderboard_id),将 data_source 指定为 CACHE_OR_NETWORK 并将超时指定为 10 年。

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  DataSource data_source,
  const std::string & leaderboard_id
)

同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。如果未指定超时值,此函数调用等同于 FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(DataSource data_source, const std::string& leaderboard_id),使用您指定的 data_source 值,将超时指定为 10 年。

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  Timeout timeout,
  const std::string & leaderboard_id
)

同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse

指定超时(以毫秒为单位)。如果未指定 data_source,则此函数调用等同于 FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(DataSource data_source, std::string const &leaderboard_id),其中 data_source 指定为 CACHE_OR_NETWORK,并且超时包含您为其指定的值。

FetchAllScoreSummariesBlocking

FetchAllScoreSummariesResponse FetchAllScoreSummariesBlocking(
  DataSource data_source,
  Timeout timeout,
  const std::string & leaderboard_id
)

同步提取特定排行榜的所有得分摘要,直接返回 FetchAllScoreSummariesResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。指定超时(以毫秒为单位)。

FetchBlocking

FetchResponse FetchBlocking(
  const std::string & leaderboard_id
)

同步加载当前已登录玩家的排行榜数据,直接返回 FetchResponse

如果既未指定 data_source 也未指定超时,则此函数调用等同于调用 FetchResponse FetchBlocking(DataSource data_source, Timeout timeout),将 data_source 指定为 CACHE_OR_NETWORK 并将超时指定为 10 年。

FetchBlocking

FetchResponse FetchBlocking(
  DataSource data_source,
  const std::string & leaderboard_id
)

同步加载当前已登录玩家的排行榜数据,直接返回 FetchResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。如果未指定超时值,此函数调用等同于调用 FetchResponse FetchBlocking(DataSource data_source, Timeout timeout),使用指定的 data_source 值并将超时指定为 10 年。

FetchBlocking

FetchResponse FetchBlocking(
  Timeout timeout,
  const std::string & leaderboard_id
)

同步加载当前已登录玩家的排行榜数据,直接返回 FetchResponse

将超时指定为任意毫秒数。如果未指定 data_source,则此函数调用等同于调用 FetchResponse FetchBlocking(DataSource data_source, Timeout timeout),将 data_source 指定为 CACHE_OR_NETWORK 且超时包含您指定的值。

FetchBlocking

FetchResponse FetchBlocking(
  DataSource data_source,
  Timeout timeout,
  const std::string & leaderboard_id
)

同步加载当前已登录玩家的排行榜数据。

直接返回 FetchResponse。将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。将超时指定为任意毫秒数。

FetchScorePage

void FetchScorePage(
  const ScorePage::ScorePageToken & token,
  FetchScorePageCallback callback
)

异步返回由得分页面令牌标识的得分页面的数据。

data_source 和 max_results 均未指定,则此函数调用等同于 FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken& token, uint32_t max_results, FetchScorePageCallback callback),其中 data_source 指定为 CACHE_OR_NETWORK,max_results 指定为 20。

FetchScorePage

void FetchScorePage(
  DataSource data_source,
  const ScorePage::ScorePageToken & token,
  FetchScorePageCallback callback
)

异步返回由得分页面令牌标识的得分页面的数据。

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。如果未指定 max_results,则此函数调用等同于 FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken& token, uint32_t max_results, FetchScorePageCallback callback),其中你为 data_source 的指定值将 max_results 指定为 20。

FetchScorePage

void FetchScorePage(
  const ScorePage::ScorePageToken & token,
  uint32_t max_results,
  FetchScorePageCallback callback
)

异步返回由得分页面令牌标识的得分页面的数据。

max_results 指定了结果得分页中包含的得分数量上限,该数量不得超过 25。如果未指定 data_source,则此函数调用等同于 FetchScorePage(DataSource data_source, const ScorePage::ScorePageToken& token, uint32_t max_results, FetchScorePageCallback callback),其中 data_source 指定为 CACHE_OR_NETWORK,max_results 包含指定的值。

FetchScorePage

void FetchScorePage(
  DataSource data_source,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results,
  FetchScorePageCallback callback
)

异步返回由得分页面令牌标识的得分页面的数据。

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。max_results 用于指定在结果得分页中包含的最大得分数,不能大于 25。

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  const ScorePage::ScorePageToken & token
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

既未指定 data_source、超时,也未指定 max_results,则此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results),其中 data_source 指定为 CACHE_OR_NETWORK,超时指定为 10 年,max_results 指定为 20

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  const ScorePage::ScorePageToken & token
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

如果既不指定超时,也不指定 max_results,则此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results),即使用指定的 data_source 值、超时指定为 10 年、将 max_results 指定为 20。

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  Timeout timeout,
  const ScorePage::ScorePageToken & token
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

指定超时(以毫秒为单位)。如果 data_source 和 max_results 均未指定,则此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results),其中 data_source 指定为 CACHE_OR_NETWORK,超时包含您指定的值,max_results 指定为 20。

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

为 max_results 指定不超过 25 的值。如果既未指定 data_source 也未指定超时,则此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results),将 data_source 指定为 CACHE_OR_NETWORK 并将超时指定为 10 年,max_results 包含指定的值。

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  Timeout timeout,
  const ScorePage::ScorePageToken & token
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。指定超时(以毫秒为单位)。如果不指定 max_value,则此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& 令牌、uint32_t max_source 和超时),作为包含 data_source 和 max_results 的指定值和 uint32_t max_results

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY,将 max_results 指定为不超过 25 的值。如果不指定超时,此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results),其中 data_source 和 max_results 包含您指定的值,超时指定为 10 年。

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  Timeout timeout,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

指定超时(以毫秒为单位), max_results 指定为最高 25 的值。如果不指定 data_source,则此函数调用等同于调用 FetchScorePageResponse FetchScorePageBlocking(DataSource data_source, Timeout timeout, const ScorePage::ScorePageToken& token, uint32_t max_results),超时和 max_results 包含您指定的值,data_source 被指定为 CACHE_OR_NETWORK。

FetchScorePageBlocking

FetchScorePageResponse FetchScorePageBlocking(
  DataSource data_source,
  Timeout timeout,
  const ScorePage::ScorePageToken & token,
  uint32_t max_results
)

同步返回由得分页面令牌标识的得分页面的数据,直接返回 FetchScorePageResponse

将 DataSource 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。将超时指定为任意毫秒数。将 max_results 指定为一个不超过 25 的值。

FetchScoreSummary

void FetchScoreSummary(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection,
  FetchScoreSummaryCallback callback
)

异步提取特定排行榜得分摘要的所有数据,该摘要包括指定排行榜的集合和时间范围。

指定 DAILY、WEEKLY 或 ALL_TIME 作为时间范围。对于集合,请指定 PUBLIC 或 SOCIAL。不指定 data_source 会使此函数调用等同于 FetchScoreSummary(DataSource data_source, const std::string& leaderboard_id, KubernetesTimeSpan time_span, LeaderboardCollection 集合, FetchScoreSummaryCallback 回调),其中 data_source 被指定为 CACHE_OR_NETWORK, collection 和 time_span 包含您指定的值。

FetchScoreSummary

void FetchScoreSummary(
  DataSource data_source,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection,
  FetchScoreSummaryCallback callback
)

异步提取特定排行榜得分摘要的所有数据,该摘要包括指定排行榜的集合和时间范围。

为 data_source 指定 CACHE_OR_NETWORK 或 NETWORK_ONLY。为 time_span 指定 DAILY、WEEKLY 或 ALL_TIME。对于集合,请指定 PUBLIC 或 SOCIAL。

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse

指定 DAILY、WEEKLY 或 ALL_TIME 作为时间范围。对于集合,请指定 PUBLIC 或 SOCIAL。如果 data_source 和超时均不指定,则此函数等同于调用 FetchScoreSummaryResponse FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, Leaderboard collection),将 data_source 指定为 CACHE_OR_NETWORK,超时指定为 10 年,并为 time_span 和 collection 指定指定值。

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  DataSource data_source,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。指定 DAILY、WEEKLY 或 ALL_TIME 作为时间范围。对于集合,请指定 PUBLIC 或 SOCIAL。如果未指定超时值,则此函数等同于调用 FetchScoreSummaryResponse FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection),调用方法为使用指定的 data_source 值,超时指定为 10 年,以及为 time_span 和 collection 指定的值。

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  Timeout timeout,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse

指定超时(以毫秒为单位)。指定 DAILY、WEEKLY 或 ALL_TIME 作为时间范围。对于集合,请指定 PUBLIC 或 SOCIAL。如果未指定 data_source,则此函数等同于调用 FetchScoreSummaryResponse FetchScoreSummaryBlocking(DataSource data_source, Timeout timeout, const std::string& leaderboard_id, LeaderboardTimeSpan time_span, LeaderboardCollection 收集),并将超时指定为 10 年,以及为 data,source 和 collection 指定的 time_span 值。

FetchScoreSummaryBlocking

FetchScoreSummaryResponse FetchScoreSummaryBlocking(
  DataSource data_source,
  Timeout timeout,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
)

同步提取特定排行榜得分摘要的所有数据,直接返回 FetchScoreSummaryResponse

将 data_source 指定为 CACHE_OR_NETWORK 或 NETWORK_ONLY。指定超时(以毫秒为单位)。指定 DAILY、WEEKLY 或 ALL_TIME 作为时间范围。对于集合,请指定 PUBLIC 或 SOCIAL。

ScorePageToken

ScorePage::ScorePageToken ScorePageToken(
  const std::string & leaderboard_id,
  LeaderboardStart start,
  LeaderboardTimeSpan time_span,
  LeaderboardCollection collection
) const 

获取特定排行榜的得分页面令牌,从得分或玩家开始,并涵盖特定时间范围和集合。

ScorePageToken 用于各种排行榜函数,以允许分页浏览得分页面。此函数创建的令牌将始终从请求范围的起始位置开始。

ShowAllUI

void ShowAllUI(
  ShowAllUICallback callback
)

向用户显示一个显示所有排行榜相关信息的界面。

它会异步调用 ShowAllUICallback

ShowAllUI

void ShowAllUI()

已弃用。 首选 ShowAllUI(ShowAllUICallback callback)。向用户显示一个显示所有排行榜相关信息的界面。界面在所有平台上异步显示。

ShowAllUIBlocking

UIStatus ShowAllUIBlocking()

向用户显示一个显示所有排行榜相关信息的界面。

它会同步返回一个 UIStatus。如果未指定 timeout,则此函数调用等同于调用 ShowAllUIBlocking(Timeout timeout) 并将 timeout 指定为 10 年。

ShowAllUIBlocking

UIStatus ShowAllUIBlocking(
  Timeout timeout
)

向用户显示一个显示所有排行榜相关信息的界面。

它会同步返回一个 UIStatus。将 timeout 指定为任意毫秒数。

ShowUI

void ShowUI(
  const std::string & leaderboard_id,
  ShowUICallback callback
)

向用户显示显示特定排行榜相关信息的界面。

它会异步调用 ShowUICallback

ShowUI

void ShowUI(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span,
  ShowUICallback callback
)

向用户显示显示特定排行榜相关信息的界面。

它会异步调用 ShowUICallback,并且最初会选择传入的 LeaderboardTimeSpan

ShowUI

void ShowUI(
  const std::string & leaderboard_id
)

已弃用。 首选 ShowUI(ShowUICallback 回调)。向用户显示显示特定排行榜相关信息的界面。界面在所有平台上异步显示。

ShowUIBlocking

UIStatus ShowUIBlocking(
  const std::string & leaderboard_id
)

向用户显示显示特定排行榜相关信息的界面。

它会同步返回一个 UIStatus。如果未指定 timeout,则此函数调用等同于调用 ShowUIBlocking(const string& leaderboard_id, Timeout timeout) 并将 timeout 指定为 10 年。

ShowUIBlocking

UIStatus ShowUIBlocking(
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span
)

向用户显示显示特定排行榜相关信息的界面。

它会同步返回一个 UIStatus。如果未指定 timeout,则此函数调用等同于调用 ShowUIBlocking(const string& leaderboard_id, Timeout timeout) 并将 timeout 指定为 10 年。界面最初将选择传入的 LeaderboardTimeSpan

ShowUIBlocking

UIStatus ShowUIBlocking(
  Timeout timeout,
  const std::string & leaderboard_id
)

向用户显示显示特定排行榜相关信息的界面。

它会同步返回一个 UIStatus。将 timeout 指定为任意毫秒数。

ShowUIBlocking

UIStatus ShowUIBlocking(
  Timeout timeout,
  const std::string & leaderboard_id,
  LeaderboardTimeSpan time_span
)

向用户显示显示特定排行榜相关信息的界面。

它会同步返回一个 UIStatus。将 timeout 指定为任意毫秒数。界面最初将选择传入的 LeaderboardTimeSpan

SubmitScore

void SubmitScore(
  const std::string & leaderboard_id,
  uint64_t score
)

将当前登录玩家的得分提交到排行榜。

如果得分(根据排行榜配置所定义)低于之前提交的同一玩家的得分,系统会忽略该得分。

SubmitScore

void SubmitScore(
  const std::string & leaderboard_id,
  uint64_t score,
  const std::string & metadata
)

针对当前登录的玩家,提交与特定 ID 和元数据相关联的排行榜得分(例如玩家获得得分的操作)。

如果得分低于之前提交的同一玩家的得分(如排行榜配置中所定义),该得分会被忽略。