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 รหัสของลีดเดอร์บอร์ด
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 URL ไอคอนของลีดเดอร์บอร์ดนี้ ระบบจะไม่สนใจการเขียนในช่องนี้
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 ตัวเป็นพิเศษ (เช่น 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 URL ไอคอนของลีดเดอร์บอร์ดนี้ ระบบจะไม่สนใจการเขียนในช่องนี้
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 ตัวเป็นพิเศษ (เช่น 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 เท่านั้น

เมธอด

ลบ
ลบการกำหนดค่าลีดเดอร์บอร์ดที่มีรหัสที่กำหนด
รับ
เรียกข้อมูลข้อมูลเมตาของการกำหนดค่าลีดเดอร์บอร์ดที่มีรหัสที่กำหนด
แทรก
แทรกการกำหนดค่าลีดเดอร์บอร์ดใหม่ในแอปพลิเคชันนี้
list
แสดงผลรายการการกำหนดค่าลีดเดอร์บอร์ดในแอปพลิเคชันนี้
อัปเดต
อัปเดตข้อมูลเมตาของการกำหนดค่าลีดเดอร์บอร์ดด้วยรหัสที่กำหนด