以下清單列出此方法的常見用途。將滑鼠遊標懸停在用途上,即可查看相關說明,或按一下用途,在 API Explorer 中載入範例參數值。您可以開啟全螢幕 API Explorer 查看程式碼範例,這些程式碼範例會動態更新以反映在 Explorer 中輸入的參數值。
下表列出此方法的常見用途。按一下用途名稱,即可在 APIs Explorer 中載入範例參數值。或者,您也可以按一下用途名稱下方的程式碼圖示,在全螢幕 API Explorer 中查看用途的程式碼範例。在全螢幕使用者介面中,您可以更新參數和屬性值,程式碼範例就會動態更新,反映輸入的值。
此方法有一個常見用途,說明如下。說明下方的按鈕會將範例值填入 API Explorer,或是開啟全螢幕 APIs Explorer,顯示使用這些值的程式碼範例。如果您變更這些值,程式碼範例也會動態更新。
Use cases | |
---|---|
list (by channel ID) | This example retrieves channel data for the GoogleDevelopers YouTube channel. It uses the id request parameter to identify the channel by its YouTube channel ID. |
list (by YouTube handle) | This example retrieves channel data for the "Google for Developers" YouTube channel. It uses the forHandle request parameter to identify the channel by its YouTube handle. |
list (by YouTube username) | This example retrieves channel data for the GoogleDevelopers YouTube channel. It uses the forUsername request parameter to identify the channel by its YouTube username. |
list (my channel) | This example retrieves the channel data for the authorized user's YouTube channel. It uses the mine request parameter to indicate that the API should only return channels owned by the user authorizing the request. |
list (channels managed by a content owner) | This example retrieves a list of channels managed by the specified YouTube content owner. |