YouTube Data API (v3) 程式碼範例
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
您可以在「用途和程式碼範例」頁面上,探索 YouTube Data API 和 YouTube Live Streaming API 的常見用途。
您可以在這裡選取 API 資源和方法,然後列出該方法的常見用途。接著,您可以點選任何用途,讓 APIs Explorer 小工具填入該用途的參數和屬性範例值。您也可以開啟全螢幕 API Explorer 小工具,查看 Java、JavaScript、PHP 和 Python 的有效程式碼範例。如果您在 APIs Explorer 中更新參數或屬性值,程式碼範例也會更新,以反映您的變更。
以下節提供其他語言的程式碼範例。
獨立程式碼片段
下列清單列出 YouTube Data API (第 3 版) 適用的程式碼範例,但不包含 Java、JavaScript、PHP 和 Python 程式語言。如前文所述,您可以在「用途和程式碼範例」頁面中找到這些語言的程式碼範例。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-14 (世界標準時間)。
[[["容易理解","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-14 (世界標準時間)。"],[[["Explore the use cases and code samples page to find examples for the YouTube Data API and YouTube Live Streaming API."],["The use cases and code samples page provides interactive samples in Java, JavaScript, PHP, and Python, allowing you to adjust parameters and see updated code."],["Standalone code snippets are available for Apps Script, Go, .NET, and Ruby, demonstrating common methods like uploading videos, searching for videos, and managing playlists."],["The page provides code samples for several common methods including subscriptions.insert, channels.list, search.list, and videos.update, allowing developers to find quick snippets for their use cases."],["Code samples are provided for various common tasks such as authorization, uploading, and searching for videos, as well as creating playlists and subscriptions."]]],["The document details code samples for the YouTube Data API and YouTube Live Streaming API. Users can find examples for common use cases by selecting an API resource and method. The APIs Explorer widget allows interaction with samples, including parameter adjustments, with working code in Java, JavaScript, PHP, and Python. Additional code snippets are available in Apps Script, Go, .NET, and Ruby, covering actions like subscribing to channels, retrieving uploads, searching videos, updating videos, and creating playlists.\n"]]