LeaderboardConfigurations

表示排行榜的配置。

有关此类资源的方法列表,请参阅本页面的结尾部分。

资源表示形式

这是排行榜配置资源的 JSON 模板。

{
  "kind": "gamesConfiguration#leaderboardConfiguration",
  "token": string,
  "id": string,
  "scoreOrder": string,
  "scoreMin": long,
  "scoreMax": long,
  "draft": {
    "kind": "gamesConfiguration#leaderboardConfigurationDetail",
    "name": {
      "kind": "gamesConfiguration#localizedStringBundle",
      "translations": [
        {
          "kind": "gamesConfiguration#localizedString",
          "locale": string,
          "value": string
        }
      ]
    },
    "iconUrl": string,
    "sortRank": integer,
    "scoreFormat": {
      "numberFormatType": string,
      "suffix": {
        "zero": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "one": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "two": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "few": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "many": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "other": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        }
      },
      "numDecimalPlaces": integer,
      "currencyCode": string
    }
  },
  "published": {
    "kind": "gamesConfiguration#leaderboardConfigurationDetail",
    "name": {
      "kind": "gamesConfiguration#localizedStringBundle",
      "translations": [
        {
          "kind": "gamesConfiguration#localizedString",
          "locale": string,
          "value": string
        }
      ]
    },
    "iconUrl": string,
    "sortRank": integer,
    "scoreFormat": {
      "numberFormatType": string,
      "suffix": {
        "zero": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "one": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "two": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "few": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "many": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        },
        "other": {
          "kind": "gamesConfiguration#localizedStringBundle",
          "translations": [
            {
              "kind": "gamesConfiguration#localizedString",
              "locale": string,
              "value": string
            }
          ]
        }
      },
      "numDecimalPlaces": integer,
      "currencyCode": string
    }
  }
}
属性名称 说明 备注
kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#leaderboardConfiguration
token string 此资源的令牌。
id string 排行榜的 ID。
scoreOrder string 排行榜的类型。
可能的值包括:
  • LARGER_IS_BETTER”- 发布的分数越高,排名就越高。
  • SMALLER_IS_BETTER”- 发布的分数越低,排名就越高。
scoreMin long 可发布到此排行榜的最低得分。
scoreMax long 可发布到此排行榜的最高得分。
draft nested object 排行榜的草稿数据。
draft.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#leaderboardConfigurationDetail
draft.name nested object 排行榜名称的本地化字符串。
draft.name.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.name.translations[] list 语言区域字符串。
draft.name.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.name.translations[].locale string 语言区域字符串。
draft.name.translations[].value string 字符串值。
draft.iconUrl string 此排行榜的图标网址。写入此字段的内容会被忽略。
draft.sortRank integer 此排行榜的排序排名。写入此字段的内容会被忽略。
draft.scoreFormat nested object 排行榜的得分格式。
draft.scoreFormat.numberFormatType string 数字的格式。
可能的值包括:
  • NUMERIC”- 根据语言区域,数字会格式化为没有数字,或在小数点后保留固定位数的位数。还可以添加可选的自定义单位。
  • TIME_DURATION”- 数字的格式应设置为小时、分钟和秒。
  • CURRENCY”- 根据语言区域,数字会采用货币格式。
draft.scoreFormat.suffix nested object NUMERIC 格式类型的可选后缀。这些字符串遵循与所有 Android 字符串资源相同的 复数规则
draft.scoreFormat.suffix.zero nested object 当某种语言要求对数字 0(如阿拉伯语中的 0)进行特殊处理时。
draft.scoreFormat.suffix.zero.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.scoreFormat.suffix.zero.translations[] list 语言区域字符串。
draft.scoreFormat.suffix.zero.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.scoreFormat.suffix.zero.translations[].locale string 语言区域字符串。
draft.scoreFormat.suffix.zero.translations[].value string 字符串值。
draft.scoreFormat.suffix.one nested object 当某种语言要求对 1 这类数字(如英语和大多数其他语言中的数字 1;在俄语中,任何末尾为 1 但非 11 的数字均属此类)进行特殊处理时。
draft.scoreFormat.suffix.one.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.scoreFormat.suffix.one.translations[] list 语言区域字符串。
draft.scoreFormat.suffix.one.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.scoreFormat.suffix.one.translations[].locale string 语言区域字符串。
draft.scoreFormat.suffix.one.translations[].value string 字符串值。
draft.scoreFormat.suffix.two nested object 当某种语言要求对 2 这类数字(如威尔士语中的 2,或斯洛文尼亚语中的 102)进行特殊处理时。
draft.scoreFormat.suffix.two.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.scoreFormat.suffix.two.translations[] list 语言区域字符串。
draft.scoreFormat.suffix.two.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.scoreFormat.suffix.two.translations[].locale string 语言区域字符串。
draft.scoreFormat.suffix.two.translations[].value string 字符串值。
draft.scoreFormat.suffix.few nested object 当某种语言要求对“小”数字(如捷克语中的 2、3 和 4;或波兰语中末尾为 2、3 或 4,但非 12、13 或 14 的数字)进行特殊处理时。
draft.scoreFormat.suffix.few.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.scoreFormat.suffix.few.translations[] list 语言区域字符串。
draft.scoreFormat.suffix.few.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.scoreFormat.suffix.few.translations[].locale string 语言区域字符串。
draft.scoreFormat.suffix.few.translations[].value string 字符串值。
draft.scoreFormat.suffix.many nested object 当某种语言要求对“大”数字(如马耳他语中末尾为 11 至 99 的数字)进行特殊处理时。
draft.scoreFormat.suffix.many.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.scoreFormat.suffix.many.translations[] list 语言区域字符串。
draft.scoreFormat.suffix.many.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.scoreFormat.suffix.many.translations[].locale string 语言区域字符串。
draft.scoreFormat.suffix.many.translations[].value string 字符串值。
draft.scoreFormat.suffix.other nested object 当某种语言未要求对给定数量(如中文中的所有数字,或英语中的 42)进行特殊处理时。
draft.scoreFormat.suffix.other.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
draft.scoreFormat.suffix.other.translations[] list 语言区域字符串。
draft.scoreFormat.suffix.other.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
draft.scoreFormat.suffix.other.translations[].locale string 语言区域字符串。
draft.scoreFormat.suffix.other.translations[].value string 字符串值。
draft.scoreFormat.numDecimalPlaces integer 数字的小数位数。仅用于 NUMERIC 格式类型。
draft.scoreFormat.currencyCode string Curreny 代码字符串。仅用于 CURRENCY 格式类型。
published nested object 排行榜的已发布数据。此数据是只读数据。
published.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#leaderboardConfigurationDetail
published.name nested object 排行榜名称的本地化字符串。
published.name.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.name.translations[] list 语言区域字符串。
published.name.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.name.translations[].locale string 语言区域字符串。
published.name.translations[].value string 字符串值。
published.iconUrl string 此排行榜的图标网址。写入此字段的内容会被忽略。
published.sortRank integer 此排行榜的排序排名。写入此字段的内容会被忽略。
published.scoreFormat nested object 排行榜的得分格式。
published.scoreFormat.numberFormatType string 数字的格式。
可能的值包括:
  • NUMERIC”- 根据语言区域,数字会格式化为没有数字,或在小数点后保留固定位数的位数。还可以添加可选的自定义单位。
  • TIME_DURATION”- 数字的格式应设置为小时、分钟和秒。
  • CURRENCY”- 根据语言区域,数字会采用货币格式。
published.scoreFormat.suffix nested object NUMERIC 格式类型的可选后缀。这些字符串遵循与所有 Android 字符串资源相同的 复数规则
published.scoreFormat.suffix.zero nested object 当某种语言要求对数字 0(如阿拉伯语中的 0)进行特殊处理时。
published.scoreFormat.suffix.zero.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.scoreFormat.suffix.zero.translations[] list 语言区域字符串。
published.scoreFormat.suffix.zero.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.scoreFormat.suffix.zero.translations[].locale string 语言区域字符串。
published.scoreFormat.suffix.zero.translations[].value string 字符串值。
published.scoreFormat.suffix.one nested object 当某种语言要求对 1 这类数字(如英语和大多数其他语言中的数字 1;在俄语中,任何末尾为 1 但非 11 的数字均属此类)进行特殊处理时。
published.scoreFormat.suffix.one.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.scoreFormat.suffix.one.translations[] list 语言区域字符串。
published.scoreFormat.suffix.one.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.scoreFormat.suffix.one.translations[].locale string 语言区域字符串。
published.scoreFormat.suffix.one.translations[].value string 字符串值。
published.scoreFormat.suffix.two nested object 当某种语言要求对 2 这类数字(如威尔士语中的 2,或斯洛文尼亚语中的 102)进行特殊处理时。
published.scoreFormat.suffix.two.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.scoreFormat.suffix.two.translations[] list 语言区域字符串。
published.scoreFormat.suffix.two.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.scoreFormat.suffix.two.translations[].locale string 语言区域字符串。
published.scoreFormat.suffix.two.translations[].value string 字符串值。
published.scoreFormat.suffix.few nested object 当某种语言要求对“小”数字(如捷克语中的 2、3 和 4;或波兰语中末尾为 2、3 或 4,但非 12、13 或 14 的数字)进行特殊处理时。
published.scoreFormat.suffix.few.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.scoreFormat.suffix.few.translations[] list 语言区域字符串。
published.scoreFormat.suffix.few.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.scoreFormat.suffix.few.translations[].locale string 语言区域字符串。
published.scoreFormat.suffix.few.translations[].value string 字符串值。
published.scoreFormat.suffix.many nested object 当某种语言要求对“大”数字(如马耳他语中末尾为 11 至 99 的数字)进行特殊处理时。
published.scoreFormat.suffix.many.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.scoreFormat.suffix.many.translations[] list 语言区域字符串。
published.scoreFormat.suffix.many.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.scoreFormat.suffix.many.translations[].locale string 语言区域字符串。
published.scoreFormat.suffix.many.translations[].value string 字符串值。
published.scoreFormat.suffix.other nested object 当某种语言未要求对给定数量(如中文中的所有数字,或英语中的 42)进行特殊处理时。
published.scoreFormat.suffix.other.kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedStringBundle
published.scoreFormat.suffix.other.translations[] list 语言区域字符串。
published.scoreFormat.suffix.other.translations[].kind string 此资源的类型的唯一标识符。值始终是固定字符串 gamesConfiguration#localizedString
published.scoreFormat.suffix.other.translations[].locale string 语言区域字符串。
published.scoreFormat.suffix.other.translations[].value string 字符串值。
published.scoreFormat.numDecimalPlaces integer 数字的小数位数。仅用于 NUMERIC 格式类型。
published.scoreFormat.currencyCode string Curreny 代码字符串。仅用于 CURRENCY 格式类型。

方法

删除
删除具有指定 ID 的排行榜配置。
get
检索具有指定 ID 的排行榜配置的元数据。
insert
在此应用中插入新的排行榜配置。
list
返回此应用中的排行榜配置列表。
update
使用指定 ID 更新排行榜配置的元数据。