Method: players.get
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שולפת את משאב הנגן עם המזהה הנתון. כדי לאחזר את הנגן עבור המשתמש המאומת הנוכחי, צריך להגדיר את playerId
לערך me
.
בקשת HTTP
GET https://games.googleapis.com/games/v1/players/{playerId}
פרמטרים של נתיב
פרמטרים |
playerId |
string
מזהה שחקן. ניתן להשתמש בערך me במקום מזהה הנגן המאומת.
|
פרמטרים של שאילתה
פרמטרים |
language |
string
השפה המועדפת לשימוש במחרוזות שמוחזרות בשיטה הזו.
|
playerIdConsistencyToken |
string
אסימון עקביות של מזהה הנגן. הקריאה מחזירה תוצאה מסוג 'לא נמצא' אם האסימון קיים והוא לא תקין. המערכת תתעלם מהערך ריק. ראו גם GlobalPlayerIdConsistencyTokenProto
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של Player
.
היקפי הרשאות
כדי להשתמש בתכונה הזו יש צורך באחד מההיקפים הבאים של OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
למידע נוסף, עיין בסקירה הכללית על OAuth 2.0.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Method: players.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nRetrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set `playerId` to `me`.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/players/{playerId}`\n\n### Path parameters\n\n| Parameters ||\n|------------|----------------------------------------------------------------------------------------------|\n| `playerId` | `string` A player ID. A value of `me` may be used in place of the authenticated player's ID. |\n\n### Query parameters\n\n| Parameters ||\n|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `playerIdConsistencyToken` | `string` Consistency token of the player id. The call returns a 'not found' result when the token is present and invalid. Empty value is ignored. See also GlobalPlayerIdConsistencyTokenProto |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Player](/games/services/web/api/rest/v1/players#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)."]]