เรากำลังอัปเดต Data API ให้สอดคล้องกับวิธีที่ YouTube นับยอดดูสำหรับ Shorts
ดูข้อมูลเพิ่มเติม
I18nRegions
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ทรัพยากร i18nRegion
จะระบุพื้นที่ทางภูมิศาสตร์ที่ผู้ใช้ YouTube เลือกเป็นภูมิภาคเนื้อหาที่ต้องการได้ ภูมิภาคของเนื้อหาอาจเรียกว่าภาษาของเนื้อหา สำหรับเว็บไซต์ YouTube ระบบอาจเลือกภูมิภาคของเนื้อหาโดยอัตโนมัติตามการคาดคะเน เช่น โดเมน YouTube หรือตำแหน่ง IP ของผู้ใช้ นอกจากนี้ ผู้ใช้ยังเลือกภูมิภาคเนื้อหาที่ต้องการด้วยตนเองได้จากส่วนท้ายของเว็บไซต์ YouTube
ทรัพยากร i18nRegion
แต่ละรายการจะระบุรหัสและชื่อภูมิภาค คุณสามารถใช้รหัสภูมิภาคเป็นค่าของพารามิเตอร์ regionCode
เมื่อเรียกใช้เมธอด API เช่น search.list
, videos.list
, activities.list
และ videoCategories.list
เมธอด
API รองรับวิธีการต่อไปนี้สำหรับทรัพยากร i18nRegions
- list
- แสดงรายการภูมิภาคของเนื้อหาที่เว็บไซต์ YouTube รองรับ
ลองใช้เลย
การนําเสนอทรัพยากร
โครงสร้าง JSON ต่อไปนี้แสดงรูปแบบของทรัพยากร i18nRegions
{
"kind": "youtube#i18nRegion",
"etag": etag,
"id": string,
"snippet": {
"gl": string,
"name": string
}
}
พร็อพเพอร์ตี้
ตารางต่อไปนี้จะกำหนดพร็อพเพอร์ตี้ที่ปรากฏในทรัพยากรนี้
พร็อพเพอร์ตี้ |
kind |
string
ระบุประเภทของทรัพยากร API ค่าจะเป็น youtube#i18nRegion |
etag |
etag
Etag ของทรัพยากรนี้ |
id |
string
รหัสที่ YouTube ใช้เพื่อระบุภูมิภาค i18n โดยไม่ซ้ำกัน |
snippet |
object
ออบเจ็กต์ snippet มีรายละเอียดพื้นฐานเกี่ยวกับภูมิภาค i18n เช่น รหัสและชื่อภูมิภาค |
snippet.gl |
string
รหัสประเทศ ISO 2 ตัวอักษรที่ระบุภูมิภาค |
snippet.name |
string
ชื่อของภูมิภาค |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-30 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-11-30 UTC"],[[["An i18nRegion resource specifies a geographic area that YouTube users can choose as their preferred content region."],["The i18nRegion includes a region code and a name, and the code can be used when calling API methods such as `search.list`."],["The YouTube API's `i18nRegions.list` method allows retrieval of a list of supported content regions."],["Each i18nRegion resource includes an `id`, `etag`, and `snippet` containing the region code (`gl`) and region `name`."]]],["The `i18nRegion` resource represents a YouTube content region, selectable by users or automatically determined. Each resource has a unique ID, region code, and name. The region code is usable in API methods like `search.list`. The resource can be retrieved via the `i18nRegions.list` method, which provides the supported content regions. The resource's properties include `kind` (`youtube#i18nRegion`), `etag`, `id`, and a `snippet` object containing the region's code (`gl`) and name.\n"]]