Method: achievements.unlock
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يتم فتح قفل هذا الإنجاز للّاعب الذي تمت مصادقته حاليًا.
طلب HTTP
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/unlock
مَعلمات المسار
المعلمات |
achievementId |
string
رقم تعريف الإنجاز المستخدَم في هذه الطريقة.
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
ردّ فتح قفل إنجاز
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"kind": string,
"newlyUnlocked": boolean
} |
الحقول |
kind |
string
تُحدِّد نوع هذا المورد بشكلٍ فريد. وتكون القيمة دائمًا هي السلسلة الثابتة games#achievementUnlockResponse .
|
newlyUnlocked |
boolean
تشير هذه السمة إلى ما إذا كان قد تم فتح قفل هذا الإنجاز حديثًا (أي ما إذا كان طلب فتح الإنجاز هو الأول للّاعب).
|
نطاقات الأذونات
يتطلب هذا الإعداد أحد نطاقات OAuth التالية:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
لمزيد من المعلومات، يُرجى الاطِّلاع على نظرة عامة على OAuth 2.0.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Method: achievements.unlock\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 - [JSON representation](#body.UnlockAchievementResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUnlocks this achievement for the currently authenticated player.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/achievements/{achievementId}/unlock`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------|\n| `achievementId` | `string` The ID of the achievement used by this method. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nAn achievement unlock response\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------|\n| ``` { \"kind\": string, \"newlyUnlocked\": boolean } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementUnlockResponse`. |\n| `newlyUnlocked` | `boolean` Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player). |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]