Method: scores.submit
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שליחת ניקוד ל-Leaderboard שצוין.
בקשת HTTP
POST https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores
פרמטרים של נתיב
פרמטרים |
leaderboardId |
string
מזהה הלידרבורד.
|
פרמטרים של שאילתה
פרמטרים |
language |
string
השפה המועדפת לשימוש במחרוזות שמוחזרות בשיטה הזו.
|
score |
string (int64 format)
חובה. הציון שלך שנשלח. המערכת מתעלמת מהציון שנשלח אם הוא נמוך יותר מהציון שנשלח בעבר, כאשר הציון הגרוע ביותר תלוי בסדר המיון של טבלת הלידרבורד. המשמעות של ערך הניקוד תלויה בסוג הפורמט של לידרבורד. במקרה של נקודה קבועה, הציון מייצג את הערך הגולמי. לגבי זמן, הציון מייצג את הזמן שחלף באלפיות השנייה. כשמדובר במטבע, הציון מייצג ערך ביחידות מיקרו.
|
scoreTag |
string
מידע נוסף על הציון שלך. הערכים לא יכולים להכיל יותר מ-64 תווים בטוחים ל-URI, כפי שהוגדר בסעיף 2.3 של RFC 3986.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של SubmitLeaderboardScoreResponse
.
היקפי הרשאות
כדי להשתמש בתכונה הזו יש צורך באחד מההיקפים הבאים של 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: scores.submit\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\nSubmits a score to the specified leaderboard.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|-------------------------------------|\n| `leaderboardId` | `string` The ID of the leaderboard. |\n\n### Query parameters\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `score` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. |\n| `scoreTag` | `string` Additional information about the score you're submitting. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. |\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 [SubmitLeaderboardScoreResponse](/games/services/web/api/rest/v1/SubmitLeaderboardScoreResponse).\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)."]]