Skip to content

Commit

Permalink
Add details to surround endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbmaier committed Oct 17, 2024
1 parent ff0cf4f commit 1a3e9fc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/live/leaderboards/surround.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ parameters:
- name: score
type: integer
description: The score/time to get surrounding records for
required: true
required: false
- name: onlyWorld
type: boolean
description: Whether to only retrieve records from the world leaderboard
required: false
---

Gets surrounding records for a score on a map's leaderboard.
Expand All @@ -45,9 +49,10 @@ Gets surrounding records for a score on a map's leaderboard.
- The `lower` and `upper` parameters used to support more than `1`, but now no more than one upper and one lower record is returned.
- This endpoint can sometimes include a delay due to leaderboard calculations happening in the background.
- This endpoint returns precise positions for the first 100,000 records - anything beyond that is not available at the same level of detail.
- When authenticated through a Ubisoft user account that has a zone assigned, the response will include multiple entries in the `tops` array - one for each of the account's assigned sub-zones (representing the leaderboards of the continent, country, city, etc.).
- When authenticated through a Ubisoft user account that has a zone assigned, the response will include multiple entries in the `tops` array - one for each of the account's assigned sub-zones (representing the leaderboards of the continent, country, city, etc.). Use `onlyWorld` to only retrieve data for the global leaderboard.
- This endpoint's response always includes the requested score as a fake record (using the requester's account information for the `accountId` and zone data) between the surrounding ones. This is because in-game this endpoint is used to determine surrounding records for your own PB (that might not have fully uploaded to the leaderboards yet), so it supports an arbitrary score value that the game sets based on your PB.
- If the authenticated account has a record on the requested map, no scores lower than that record can be requested - it's recommended to use this endpoint with an account that does not have any records.
- When using a Ubisoft account, the `score` parameter may be omitted to retrieve the player's PB leaderboard position and its surrounding data. When the authenticated player doesn't have a PB on the requested map (or when using a dedicated server account), any request without a `score` parameter will return an empty object (`{}`).

---

Expand Down

0 comments on commit 1a3e9fc

Please sign in to comment.