ChannelBanners
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משאב channelBanner
מכיל את כתובת ה-URL שבה משתמשים כדי להגדיר תמונה חדשה שהועלתה כתמונה של באנר לערוץ.
Methods
ה-API תומך בשיטות הבאות למשאבי channelBanners
:
- insert
- העלאת תמונה של באנר הערוץ ל-YouTube. השיטה הזו מייצגת את שני השלבים הראשונים בתהליך בן שלושה שלבים לעדכון תמונת הבאנר של הערוץ:
- קוראים לשיטה
channelBanners.insert
כדי להעלות את נתוני התמונה הבינארית ל-YouTube. התמונה צריכה להיות ביחס גובה-רוחב של 16:9 ובגודל 2048x1152 פיקסלים לפחות. מומלץ להעלות תמונה בגודל 2560px על 1440px. - מחלצים את הערך של המאפיין
url
מהתגובה שה-API מחזיר בשלב 1. - כדי לעדכן את הגדרות המיתוג של הערוץ, צריך להפעיל את השיטה
channels.update
. מגדירים את הערך של המאפיין brandingSettings.image.bannerExternalUrl
לכתובת ה-URL שהתקבלה בשלב 2.
ייצוג משאבים
המבנה הבא של JSON מציג את הפורמט של משאב channelBanners
:
{
"kind": "youtube#channelBannerResource",
"etag": etag,
"url": string
}
מאפיינים
בטבלה הבאה מפורטים המאפיינים שמופיעים במשאב הזה:
מאפיינים |
kind |
string
מזהה את סוג משאב ה-API. הערך יהיה youtube#channelBannerResource . |
etag |
etag
ה-Etag של המשאב הזה. |
url |
string
כתובת ה-URL של תמונת הבאנר. אחרי שמפעילים את השיטה channelBanners.insert , מחלצים את הערך הזה מתשובת ה-API. לאחר מכן, קוראים ל-method channels.update ומגדירים את כתובת ה-URL כערך של המאפיין brandingSettings.image.bannerExternalUrl כדי להגדיר את תמונת הבאנר של הערוץ. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-12-21 (שעון 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-12-21 (שעון UTC)."],[[["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"]]