Method: accounts.icons.create
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تحميل رمز جديد وبدء عملية المراجعة. عرض حالة HTTP 400 وعدم تشغيل عملية المراجعة إذا كان الرمز يحتوي على أيٍّ من الشروط التالية:
- الصورة ليست بتنسيق PNG، أو غير قابلة للتحويل إلى تنسيق PNG.
- الحجم أقل من 72 بكسل
- الحجم أكبر من 1200 بكسل
- نسبة العرض إلى الارتفاع غير 1:1
طلب HTTP
POST https://travelpartner.googleapis.com/v3/{parent=accounts/*}/icons
يستخدم عنوان URL بنية gRPC Transcoding.
معلّمات المسار
المَعلمات |
parent |
string
مطلوبة. اسم المورد لحساب الشريك الذي يملك الرمز. التنسيق هو accounts/{account_id} .
|
نص الطلب
يحتوي نص الطلب على مثال Icon
.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال Icon
تم إنشاؤه حديثًا.
نطاقات الأذونات
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/travelpartner
للحصول على مزيد من المعلومات، يُرجى الاطّلاع على نظرة عامة على OAuth 2.0.
جميع الحقوق محفوظة. إنّ Java علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2022-08-23 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2022-08-23 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eUploads a new icon for a partner account and starts a review process, generating a unique \u003ccode\u003eicon_id\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe icon must be a PNG image with a size between 72 and 1200 pixels and an aspect ratio of 1:1.\u003c/p\u003e\n"],["\u003cp\u003eIf the icon meets the requirements, the API returns the icon details; otherwise, it returns an HTTP 400 error.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/travelpartner\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003ePOST\u003c/code\u003e method and the URL \u003ccode\u003ehttps://travelpartner.googleapis.com/v3/{parent=accounts/*}/icons\u003c/code\u003e with the account ID as a path parameter.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.icons.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nUploads a new icon and starts its review process. Generates an `icon_id` and includes it in the icon's resource name, which is the format `accounts/{account_id}/icons/{icon_id}`\n\nReturns HTTP status 400 and doesn't trigger the review process if the icon has any of these conditions:\n\n- Image is not in PNG format, or not convertible to PNG format.\n- Size less than 72 pixels\n- Size greater than 1200 pixels\n- Aspect ratio other than 1:1\n\n### HTTP request\n\n`POST https://travelpartner.googleapis.com/v3/{parent=accounts/*}/icons`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The resource name of the partner account owning the icon. The format is `accounts/{account_id}`. |\n\n### Request body\n\nThe request body contains an instance of [Icon](/hotels/hotel-prices/api-reference/rest/v3/accounts.icons#Icon).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Icon](/hotels/hotel-prices/api-reference/rest/v3/accounts.icons#Icon).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/travelpartner`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]