یک تصویر بنر کانال را در YouTube آپلود می کند. این روش نشان دهنده دو مرحله اول در یک فرآیند سه مرحله ای برای به روز رسانی تصویر بنر برای یک کانال است:
با روش channelBanners.insert تماس بگیرید تا داده های تصویر باینری را در YouTube آپلود کنید. تصویر باید دارای نسبت تصویر 16:9 و حداقل 2048x1152 پیکسل باشد. توصیه می کنیم یک تصویر 2560 در 1440 پیکسل را آپلود کنید.
مقدار ویژگی url را از پاسخی که API برای مرحله 1 برمیگرداند استخراج کنید.
جدول زیر ویژگی های ظاهر شده در این منبع را تعریف می کند:
خواص
kind
string نوع منبع API را مشخص می کند. مقدار youtube#channelBannerResource خواهد بود.
etag
etag Etag این منبع
url
string نشانی اینترنتی تصویر بنر. پس از فراخوانی متد channelBanners.insert ، این مقدار را از پاسخ API استخراج کنید. سپس متد channels.update را فراخوانی کنید و URL را به عنوان مقدار ویژگی brandingSettings.image.bannerExternalUrl تنظیم کنید تا تصویر بنر را برای یک کانال تنظیم کنید.
تاریخ آخرین بهروزرسانی 2025-01-05 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-05 بهوقت ساعت هماهنگ جهانی."],[[["The `channelBanner` resource provides the URL needed to set a newly uploaded image as a channel's banner image."],["Updating a channel banner image involves a three-step process, starting with uploading the image using the `channelBanners.insert` method."],["The uploaded banner image must have a 16:9 aspect ratio and be at least 2048x1152 pixels, with 2560x1440 recommended."],["After uploading, the `url` property from the API response is extracted, and then used in the `channels.update` method, specifically in the `brandingSettings.image.bannerExternalUrl` property, to set the banner image."],["The `channelBanners` resource contains `kind`, `etag`, and `url` properties, with the `url` property holding the banner image's URL."]]],["The `channelBanner` resource provides a URL for setting a channel's banner image. Updating a banner involves three steps: first, use `channelBanners.insert` to upload an image (16:9 aspect ratio, at least 2048x1152 pixels). Second, extract the `url` from the response. Third, use `channels.update`, setting `brandingSettings.image.bannerExternalUrl` to the extracted URL. The resource includes `kind` (`youtube#channelBannerResource`), `etag`, and the banner image's `url`.\n"]]