排行榜配置

表示排行榜的配置。

有关此资源的方法列表,请参阅本页面末尾。

资源表示

这是排行榜配置资源的 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 嵌套对象 排行榜的草稿数据。
draft.kind string 唯一标识此资源的类型。值始终是固定字符串 gamesConfiguration#leaderboardConfigurationDetail
draft.name 嵌套对象 排行榜名称的本地化字符串。
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 嵌套对象 排行榜的分数格式。
draft.scoreFormat.numberFormatType string 数字的格式。
可能的值包括
  • "NUMERIC" - 数字会根据区域设置格式化,小数点后不包含数字或包含固定位数的数字。可以添加可选的自定义单位。
  • "TIME_DURATION" - 数字会格式化为小时、分钟和秒。
  • "CURRENCY" - 数字会根据区域设置格式化为货币。
draft.scoreFormat.suffix 嵌套对象 NUMERIC 格式类型的可选后缀。这些字符串遵循与所有 Android 字符串资源相同的复数规则
draft.scoreFormat.suffix.zero 嵌套对象 当语言要求对数字 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 嵌套对象 当语言要求对数字 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 嵌套对象 当语言要求对数字 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 嵌套对象 当语言要求对“小”数字进行特殊处理时(例如捷克语中的 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 嵌套对象 当语言要求对“大”数字进行特殊处理时(例如马耳他语中以 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 嵌套对象 当语言对给定数量没有特殊处理要求时(例如汉语中的所有数字,或英语中的 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 货币代码字符串。仅用于 CURRENCY 格式类型。
published 嵌套对象 排行榜的已发布数据。此数据为只读。
published.kind string 唯一标识此资源的类型。值始终是固定字符串 gamesConfiguration#leaderboardConfigurationDetail
published.name 嵌套对象 排行榜名称的本地化字符串。
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 嵌套对象 排行榜的分数格式。
published.scoreFormat.numberFormatType string 数字的格式。
可能的值包括
  • "NUMERIC" - 数字会根据区域设置格式化,小数点后不包含数字或包含固定位数的数字。可以添加可选的自定义单位。
  • "TIME_DURATION" - 数字会格式化为小时、分钟和秒。
  • "CURRENCY" - 数字会根据区域设置格式化为货币。
published.scoreFormat.suffix 嵌套对象 NUMERIC 格式类型的可选后缀。这些字符串遵循与所有 Android 字符串资源相同的复数规则
published.scoreFormat.suffix.zero 嵌套对象 当语言要求对数字 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 嵌套对象 当语言要求对数字 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 嵌套对象 当语言要求对数字 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 嵌套对象 当语言要求对“小”数字进行特殊处理时(例如捷克语中的 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 嵌套对象 当语言要求对“大”数字进行特殊处理时(例如马耳他语中以 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 嵌套对象 当语言对给定数量没有特殊处理要求时(例如汉语中的所有数字,或英语中的 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 货币代码字符串。仅用于 CURRENCY 格式类型。

方法

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