LeaderboardConfigurations

Thể hiện cấu hình của bảng xếp hạng.

Để xem danh sách các phương thức cho tài nguyên này, hãy xem ở cuối trang này.

Biểu diễn tài nguyên

Đây là mẫu JSON cho tài nguyên cấu hình bảng xếp hạng.

{
  "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
    }
  }
}
Tên tài sản Giá trị Nội dung mô tả Ghi chú
kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#leaderboardConfiguration.
token string Mã thông báo cho tài nguyên này.
id string Mã của bảng xếp hạng.
scoreOrder string Loại bảng xếp hạng.
Các giá trị có thể là:
  • "LARGER_IS_BETTER" – Các điểm số lớn hơn được đăng sẽ có thứ hạng cao hơn.
  • "SMALLER_IS_BETTER" – Điểm số nhỏ hơn đã đăng sẽ có thứ hạng cao hơn.
scoreMin long Điểm tối thiểu có thể được đăng lên bảng xếp hạng này.
scoreMax long Số điểm tối đa có thể đăng lên bảng xếp hạng này.
draft nested object Dữ liệu nháp của bảng xếp hạng.
draft.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#leaderboardConfigurationDetail.
draft.name nested object Chuỗi đã bản địa hoá cho tên bảng xếp hạng.
draft.name.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.name.translations[] list Chuỗi ngôn ngữ.
draft.name.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.name.translations[].locale string Chuỗi ngôn ngữ.
draft.name.translations[].value string Giá trị chuỗi.
draft.iconUrl string URL biểu tượng của bảng xếp hạng này. Hoạt động ghi vào trường này sẽ bị bỏ qua.
draft.sortRank integer Thứ hạng sắp xếp của bảng xếp hạng này. Hoạt động ghi vào trường này sẽ bị bỏ qua.
draft.scoreFormat nested object Định dạng điểm số cho bảng xếp hạng.
draft.scoreFormat.numberFormatType string Định dạng của số.
Các giá trị có thể sử dụng là:
  • "NUMERIC" – Các số được định dạng sao cho không có chữ số nào hoặc một số chữ số cố định sau dấu thập phân theo ngôn ngữ. Bạn có thể thêm đơn vị tuỳ chỉnh không bắt buộc.
  • "TIME_DURATION" – Số được định dạng thành giờ, phút và giây.
  • "CURRENCY" – Các số được định dạng thành đơn vị tiền tệ theo ngôn ngữ.
draft.scoreFormat.suffix nested object Hậu tố không bắt buộc cho loại định dạng age. Các chuỗi này tuân theo các quy tắc số nhiều giống như mọi tài nguyên chuỗi của Android.
draft.scoreFormat.suffix.zero nested object Khi ngôn ngữ yêu cầu cách xử lý đặc biệt đối với số 0 (như trong tiếng Ả Rập).
draft.scoreFormat.suffix.zero.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.scoreFormat.suffix.zero.translations[] list Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.zero.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.scoreFormat.suffix.zero.translations[].locale string Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.zero.translations[].value string Giá trị chuỗi.
draft.scoreFormat.suffix.one nested object Khi ngôn ngữ yêu cầu xử lý đặc biệt các số chẳng hạn như số một (như với số 1 trong tiếng Anh và hầu hết ngôn ngữ khác; trong tiếng Nga, bất kỳ số nào kết thúc bằng số 1 nhưng không kết thúc bằng số 11 đều ở trong lớp này).
draft.scoreFormat.suffix.one.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.scoreFormat.suffix.one.translations[] list Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.one.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.scoreFormat.suffix.one.translations[].locale string Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.one.translations[].value string Giá trị chuỗi.
draft.scoreFormat.suffix.two nested object Khi ngôn ngữ yêu cầu xử lý đặc biệt các số chẳng hạn như số hai (như với số 2 trong tiếng Wales hoặc 102 trong tiếng Slovenia).
draft.scoreFormat.suffix.two.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.scoreFormat.suffix.two.translations[] list Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.two.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.scoreFormat.suffix.two.translations[].locale string Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.two.translations[].value string Giá trị chuỗi.
draft.scoreFormat.suffix.few nested object Khi ngôn ngữ yêu cầu cách xử lý đặc biệt các số "nhỏ" (như với số 2, 3 và 4 trong tiếng Séc; hoặc các số kết thúc bằng số 2, 3 hoặc 4 nhưng không phải là số 12, 13 hoặc 14 trong tiếng Ba Lan).
draft.scoreFormat.suffix.few.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.scoreFormat.suffix.few.translations[] list Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.few.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.scoreFormat.suffix.few.translations[].locale string Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.few.translations[].value string Giá trị chuỗi.
draft.scoreFormat.suffix.many nested object Khi ngôn ngữ yêu cầu xử lý đặc biệt các số "lớn" (như các số kết thúc từ 11-99 trong tiếng Malta).
draft.scoreFormat.suffix.many.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.scoreFormat.suffix.many.translations[] list Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.many.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.scoreFormat.suffix.many.translations[].locale string Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.many.translations[].value string Giá trị chuỗi.
draft.scoreFormat.suffix.other nested object Khi ngôn ngữ không yêu cầu xử lý đặc biệt về số lượng đã cho (như với tất cả các số trong tiếng Trung, hoặc số 42 trong tiếng Anh).
draft.scoreFormat.suffix.other.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
draft.scoreFormat.suffix.other.translations[] list Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.other.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
draft.scoreFormat.suffix.other.translations[].locale string Chuỗi ngôn ngữ.
draft.scoreFormat.suffix.other.translations[].value string Giá trị chuỗi.
draft.scoreFormat.numDecimalPlaces integer Số chữ số thập phân của số. Chỉ được sử dụng cho loại định dạng developers.
draft.scoreFormat.currencyCode string Chuỗi mã tiền tệ. Chỉ được sử dụng cho loại định dạng CURRENCY.
published nested object Dữ liệu đã xuất bản của bảng xếp hạng. Dữ liệu này chỉ có thể đọc.
published.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#leaderboardConfigurationDetail.
published.name nested object Chuỗi đã bản địa hoá cho tên bảng xếp hạng.
published.name.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.name.translations[] list Chuỗi ngôn ngữ.
published.name.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.name.translations[].locale string Chuỗi ngôn ngữ.
published.name.translations[].value string Giá trị chuỗi.
published.iconUrl string URL biểu tượng của bảng xếp hạng này. Hoạt động ghi vào trường này sẽ bị bỏ qua.
published.sortRank integer Thứ hạng sắp xếp của bảng xếp hạng này. Hoạt động ghi vào trường này sẽ bị bỏ qua.
published.scoreFormat nested object Định dạng điểm số cho bảng xếp hạng.
published.scoreFormat.numberFormatType string Định dạng của số.
Các giá trị có thể sử dụng là:
  • "NUMERIC" – Các số được định dạng sao cho không có chữ số nào hoặc một số chữ số cố định sau dấu thập phân theo ngôn ngữ. Bạn có thể thêm đơn vị tuỳ chỉnh không bắt buộc.
  • "TIME_DURATION" – Số được định dạng thành giờ, phút và giây.
  • "CURRENCY" – Các số được định dạng thành đơn vị tiền tệ theo ngôn ngữ.
published.scoreFormat.suffix nested object Hậu tố không bắt buộc cho loại định dạng age. Các chuỗi này tuân theo các quy tắc số nhiều giống như mọi tài nguyên chuỗi của Android.
published.scoreFormat.suffix.zero nested object Khi ngôn ngữ yêu cầu cách xử lý đặc biệt đối với số 0 (như trong tiếng Ả Rập).
published.scoreFormat.suffix.zero.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.scoreFormat.suffix.zero.translations[] list Chuỗi ngôn ngữ.
published.scoreFormat.suffix.zero.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.scoreFormat.suffix.zero.translations[].locale string Chuỗi ngôn ngữ.
published.scoreFormat.suffix.zero.translations[].value string Giá trị chuỗi.
published.scoreFormat.suffix.one nested object Khi ngôn ngữ yêu cầu xử lý đặc biệt các số chẳng hạn như số một (như với số 1 trong tiếng Anh và hầu hết ngôn ngữ khác; trong tiếng Nga, bất kỳ số nào kết thúc bằng số 1 nhưng không kết thúc bằng số 11 đều ở trong lớp này).
published.scoreFormat.suffix.one.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.scoreFormat.suffix.one.translations[] list Chuỗi ngôn ngữ.
published.scoreFormat.suffix.one.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.scoreFormat.suffix.one.translations[].locale string Chuỗi ngôn ngữ.
published.scoreFormat.suffix.one.translations[].value string Giá trị chuỗi.
published.scoreFormat.suffix.two nested object Khi ngôn ngữ yêu cầu xử lý đặc biệt các số chẳng hạn như số hai (như với số 2 trong tiếng Wales hoặc 102 trong tiếng Slovenia).
published.scoreFormat.suffix.two.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.scoreFormat.suffix.two.translations[] list Chuỗi ngôn ngữ.
published.scoreFormat.suffix.two.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.scoreFormat.suffix.two.translations[].locale string Chuỗi ngôn ngữ.
published.scoreFormat.suffix.two.translations[].value string Giá trị chuỗi.
published.scoreFormat.suffix.few nested object Khi ngôn ngữ yêu cầu cách xử lý đặc biệt các số "nhỏ" (như với số 2, 3 và 4 trong tiếng Séc; hoặc các số kết thúc bằng số 2, 3 hoặc 4 nhưng không phải là số 12, 13 hoặc 14 trong tiếng Ba Lan).
published.scoreFormat.suffix.few.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.scoreFormat.suffix.few.translations[] list Chuỗi ngôn ngữ.
published.scoreFormat.suffix.few.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.scoreFormat.suffix.few.translations[].locale string Chuỗi ngôn ngữ.
published.scoreFormat.suffix.few.translations[].value string Giá trị chuỗi.
published.scoreFormat.suffix.many nested object Khi ngôn ngữ yêu cầu xử lý đặc biệt các số "lớn" (như các số kết thúc từ 11-99 trong tiếng Malta).
published.scoreFormat.suffix.many.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.scoreFormat.suffix.many.translations[] list Chuỗi ngôn ngữ.
published.scoreFormat.suffix.many.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.scoreFormat.suffix.many.translations[].locale string Chuỗi ngôn ngữ.
published.scoreFormat.suffix.many.translations[].value string Giá trị chuỗi.
published.scoreFormat.suffix.other nested object Khi ngôn ngữ không yêu cầu xử lý đặc biệt về số lượng đã cho (như với tất cả các số trong tiếng Trung, hoặc số 42 trong tiếng Anh).
published.scoreFormat.suffix.other.kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedStringBundle.
published.scoreFormat.suffix.other.translations[] list Chuỗi ngôn ngữ.
published.scoreFormat.suffix.other.translations[].kind string Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi cố định gamesConfiguration#localizedString.
published.scoreFormat.suffix.other.translations[].locale string Chuỗi ngôn ngữ.
published.scoreFormat.suffix.other.translations[].value string Giá trị chuỗi.
published.scoreFormat.numDecimalPlaces integer Số chữ số thập phân của số. Chỉ được sử dụng cho loại định dạng developers.
published.scoreFormat.currencyCode string Chuỗi mã tiền tệ. Chỉ được sử dụng cho loại định dạng CURRENCY.

Phương thức

xóa
Xoá cấu hình bảng xếp hạng có mã nhận dạng đã cho.
nhận
Truy xuất siêu dữ liệu của cấu hình bảng xếp hạng theo mã nhận dạng cho trước.
chèn
Chèn một cấu hình bảng xếp hạng mới vào ứng dụng này.
list
Trả về danh sách các cấu hình bảng xếp hạng trong ứng dụng này.
cập nhật
Cập nhật siêu dữ liệu của cấu hình bảng xếp hạng bằng mã nhận dạng đã cho.