REST Resource: accounts.adUnits
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المرجع: الوحدة الإعلانية
تصف وحدة إعلانية في AdMob.
تمثيل JSON |
{
"name": string,
"adUnitId": string,
"appId": string,
"displayName": string,
"adFormat": string,
"adTypes": [
string
],
"rewardSettings": {
object (RewardSettings )
}
} |
الحقول |
name |
string
اسم المورد لهذه الوحدة الإعلانية. التنسيق هو accounts/{publisherId}/adUnits/{ad_unit_id_segment} مثال: accounts/pub-9876543210987654/adUnits/0123456789
|
adUnitId |
string
رقم التعريف المرئي للوحدة الإعلانية الذي يمكن استخدامه للدمج مع AdMob SDK. هذه خاصية للقراءة فقط. مثال: ca-app-pub-9876543210987654/0123456789
|
appId |
string
رقم التعريف المرئي للتطبيق الذي ترتبط به هذه الوحدة الإعلانية. مثال: ca-app-pub-9876543210987654~0123456789
|
displayName |
string
الاسم المعروض للوحدة الإعلانية كما هو موضّح في واجهة مستخدم AdMob، والتي يقدّمها المستخدم. الحد الأقصى للطول المسموح به هو 80 حرفًا.
|
adFormat |
string
شكل الإعلان للوحدة الإعلانية. في ما يلي القيم المحتمَلة: "APP_OPEN" - شكل الإعلان على شاشة فتح التطبيق. إعلان بانر (BANNER) - شكل إعلان البانر. "BANNER_INTERSTITIAL"
- شكل قديم يمكن استخدامه كإعلان بانر أو إعلان بيني. لم يعُد من الممكن إنشاء هذا الشكل، ولكن يمكن لمجموعات التوسّط استهدافه. "داخلي" - إعلان بملء الشاشة. أنواع الإعلانات المعتمدة هي "RICH_MEDIA" و"VIDEO". "NATIVE" - شكل الإعلان المدمج مع المحتوى. "مكافأة" - إعلان يتلقى، فور مشاهدته، معاودة الاتصال للتحقق من المشاهدة حتى يتم منح مكافأة للمستخدم. أنواع الإعلانات المعتمدة هي "RICH_MEDIA" (تفاعلي) والفيديو الذي لا يمكن استبعاد الفيديو فيه. REWARDED_INTERSTITIAL - شكل الإعلان البيني بمكافأة. يتوافق مع نوع إعلانات الفيديو فقط. يُرجى الاطّلاع على https://support.google.com/admob/answer/9884467.
|
adTypes[] |
string
نوع وسائط الإعلانات المتوافق مع هذه الوحدة الإعلانية. القيم المتاحة على النحو التالي: RICH_MEDIA (RICH_MEDIA) - الوسائط النصية والصورية وغيرها من الوسائط غير المرئية "فيديو" - وسائط الفيديو.
|
rewardSettings |
object (RewardSettings )
اختياريّ. إعدادات وحدة إعلانية تضم مكافأة. ولا يمكن ضبط هذا الخيار أو إلغاء ضبطه إلا عندما يكون شكل الإعلان "REWARDED".
|
RewardSettings
إعدادات وحدة إعلانية تضم مكافأة.
تمثيل JSON |
{
"unitAmount": string,
"unitType": string
} |
الحقول |
unitAmount |
string (int64 format)
مبلغ المكافأة لهذه الوحدة الإعلانية.
|
unitType |
string
عنصر مكافأة لهذه الوحدة الإعلانية.
|
الطُرق |
|
تُنشئ وحدة إعلانية ضمن حساب AdMob المحدّد. |
|
أدرِج الوحدات الإعلانية ضمن حساب AdMob المحدّد. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe AdUnit resource describes an AdMob ad unit, containing properties like name, ID, format, and reward settings.\u003c/p\u003e\n"],["\u003cp\u003eAdUnits support various ad formats, including banner, interstitial, rewarded, and native, each with specific properties and functionalities.\u003c/p\u003e\n"],["\u003cp\u003eRewardSettings, applicable to rewarded ad units, define the reward amount and type for users upon viewing an ad.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage AdUnits using the AdMob API to create new units and list existing ones under your account.\u003c/p\u003e\n"]]],["The core content details AdUnit and RewardSettings resources, including their JSON representations and fields. AdUnit describes an AdMob ad unit with properties like name, ID, app association, display name, format (e.g., banner, interstitial, rewarded), and supported ad types (e.g., rich media, video). RewardSettings defines settings for rewarded ad units, specifying the reward amount and item. Key methods are to create and list ad units under a given AdMob account.\n"],null,["# REST Resource: accounts.adUnits\n\n- [Resource: AdUnit](#AdUnit)\n - [JSON representation](#AdUnit.SCHEMA_REPRESENTATION)\n- [RewardSettings](#RewardSettings)\n - [JSON representation](#RewardSettings.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: AdUnit\n----------------\n\nDescribes an AdMob ad unit.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"adUnitId\": string, \"appId\": string, \"displayName\": string, \"adFormat\": string, \"adTypes\": [ string ], \"rewardSettings\": { object (/admob/api/reference/rest/v1beta/accounts.adUnits#RewardSettings) } } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name for this ad unit. Format is accounts/{publisherId}/adUnits/{ad_unit_id_fragment} Example: accounts/pub-9876543210987654/adUnits/0123456789 |\n| `adUnitId` | `string` The externally visible ID of the ad unit which can be used to integrate with the AdMob SDK. This is a read only property. Example: ca-app-pub-9876543210987654/0123456789 |\n| `appId` | `string` The externally visible ID of the app this ad unit is associated with. Example: ca-app-pub-9876543210987654\\~0123456789 |\n| `displayName` | `string` The display name of the ad unit as shown in the AdMob UI, which is provided by the user. The maximum length allowed is 80 characters. |\n| `adFormat` | `string` AdFormat of the ad unit. Possible values are as follows: \"APP_OPEN\" - App Open ad format. \"BANNER\" - Banner ad format. \"BANNER_INTERSTITIAL\" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. \"INTERSTITIAL\" - A full screen ad. Supported ad types are \"RICH_MEDIA\" and \"VIDEO\". \"NATIVE\" - Native ad format. \"REWARDED\" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are \"RICH_MEDIA\" (interactive) and video where video can not be excluded. \"REWARDED_INTERSTITIAL\" - Rewarded Interstitial ad format. Only supports video ad type. See \u003chttps://support.google.com/admob/answer/9884467\u003e. |\n| `adTypes[]` | `string` Ad media type supported by this ad unit. Possible values as follows: \"RICH_MEDIA\" - Text, image, and other non-video media. \"VIDEO\" - Video media. |\n| `rewardSettings` | `object (`[RewardSettings](/admob/api/reference/rest/v1beta/accounts.adUnits#RewardSettings)`)` Optional. Settings for a rewarded ad unit. This can be set or unset only when the adFormat is \"REWARDED\". |\n\nRewardSettings\n--------------\n\nSettings for a rewarded ad unit.\n\n| JSON representation |\n|------------------------------------------------------|\n| ``` { \"unitAmount\": string, \"unitType\": string } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------------------|\n| `unitAmount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Reward amount for this ad unit. |\n| `unitType` | `string` Reward item for this ad unit. |\n\n| Methods ------- ||\n|------------------------------------------------------------------------|-------------------------------------------------------|\n| ### [create](/admob/api/reference/rest/v1beta/accounts.adUnits/create) | Creates an ad unit under the specified AdMob account. |\n| ### [list](/admob/api/reference/rest/v1beta/accounts.adUnits/list) | List the ad units under the specified AdMob account. |"]]