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 時 (如阿拉伯文)。
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,或斯洛維尼亞語的 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 隱形代碼字串。僅適用於 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 時 (如阿拉伯文)。
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,或斯洛維尼亞語的 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 隱形代碼字串。僅適用於 CURRENCY 格式類型。

方法

刪除
刪除具有指定 ID 的排行榜設定。
取得
使用指定 ID 擷取排行榜設定的中繼資料。
插入
在這個應用程式中插入新的排行榜設定。
list
傳回此應用程式中的排行榜設定清單。
更新
使用指定 ID 更新排行榜設定的中繼資料。