-
Notifications
You must be signed in to change notification settings - Fork 11
Add Core favorites endpoints #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| name: Add favorite map | ||
|
|
||
| url: https://prod.trackmania.core.nadeo.online | ||
| method: POST | ||
| route: /maps/favorites | ||
|
|
||
| audience: NadeoServices | ||
|
|
||
| parameters: | ||
| body: | ||
| - name: mapUid | ||
| type: string | ||
| description: The UID of the map | ||
| required: true | ||
| --- | ||
|
|
||
| The request body contains the map to add, identified by its mapUid: | ||
|
|
||
| ```json | ||
| { | ||
| "mapUid": "{mapUid}" | ||
| } | ||
| ``` | ||
|
|
||
| Adds a map to your authenticated account's favorites. | ||
|
|
||
| --- | ||
|
|
||
| **Remarks**: | ||
|
|
||
| - This endpoint is only useful with tokens authenticated through Ubisoft user accounts (as opposed to dedicated server accounts). | ||
| - This endpoint serves the same purpose as the [Live API's Add favorite map endpoint](/live/maps/add-favorite), but the request format is different. | ||
|
|
||
| --- | ||
|
|
||
| **Example request**: | ||
|
|
||
| ```plain | ||
| POST https://prod.trackmania.core.nadeo.online/maps/favorites | ||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "mapUid": "KRelvYHRjEQoqnkJ_Th8FLKzTsg" | ||
| } | ||
| ``` | ||
|
|
||
| **Example response**: | ||
|
|
||
| ```plain | ||
| null | ||
| ``` | ||
|
|
||
| Both successful and unsuccessful responses (including requests for maps that don't exist) return a `200` response code. | ||
|
|
||
| An invalid `mapUid` results in a `400` response code with an error object in the response body. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| name: Get favorite maps by UIDs | ||
|
|
||
| url: https://prod.trackmania.core.nadeo.online | ||
| method: GET | ||
| route: /maps/favorites/by-map-uids?mapUidList={mapUidList} | ||
|
|
||
| audience: NadeoServices | ||
|
|
||
| parameters: | ||
| query: | ||
| - name: mapUidList | ||
| type: string | ||
| description: A comma-separated list of map UIDs | ||
| required: true | ||
| --- | ||
|
|
||
| Gets maps in your authenticated account's favorite tracks via their UIDs. | ||
|
|
||
| --- | ||
|
|
||
| **Remarks**: | ||
|
|
||
| - This endpoint is only useful with tokens authenticated through Ubisoft user accounts (as opposed to dedicated server accounts). | ||
| - The `timestamp` field is when the map was added to your favorite tracks. | ||
|
|
||
| --- | ||
|
|
||
| **Example request**: | ||
|
|
||
| ```plain | ||
| GET https://prod.trackmania.core.nadeo.online/maps/favorites/by-map-uids?mapUidList=WGWbB_OQnMk3RfD1b3laxonXJQh,KRelvYHRjEQoqnkJ_Th8FLKzTsg | ||
| ``` | ||
|
|
||
| **Example response**: | ||
|
|
||
| ```json | ||
| { | ||
| "mapFavoriteList": [ | ||
| { | ||
| "accountId": "69f31664-4252-48e0-a433-024c49caee8c", | ||
| "mapUid": "KRelvYHRjEQoqnkJ_Th8FLKzTsg", | ||
| "timestamp": "2026-02-13T18:12:03+00:00" | ||
| }, | ||
| { | ||
| "accountId": "69f31664-4252-48e0-a433-024c49caee8c", | ||
| "mapUid": "WGWbB_OQnMk3RfD1b3laxonXJQh", | ||
| "timestamp": "2026-02-13T21:24:28+00:00" | ||
| } | ||
| ], | ||
| "count": 2 | ||
| } | ||
| ``` | ||
|
|
||
| If a map can't be found or isn't part of your favorites, it will be omitted from the response. | ||
|
|
||
| An invalid `mapUid` results in a `400` response code with an error object in the response body. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| name: Get favorite maps | ||
|
|
||
| url: https://prod.trackmania.core.nadeo.online | ||
| method: GET | ||
| route: /maps/favorites?offset={offset}&length={length}&sort={sort}&order={order}&mapTypeList={mapTypeList}&playable={playable}&onlyMine={onlyMine} | ||
|
|
||
| audience: NadeoServices | ||
|
|
||
| parameters: | ||
| query: | ||
| - name: offset | ||
| type: integer | ||
| description: The number of maps to skip | ||
| required: true | ||
| - name: length | ||
| type: integer | ||
| description: The number of maps to retrieve | ||
| required: true | ||
| min: 1 | ||
| - name: sort | ||
| type: string | ||
| description: The sorting of the maps | ||
| default: "date" | ||
| - name: order | ||
| type: string | ||
| description: The order of the maps based on the sorting | ||
| default: "desc" | ||
| - name: mapTypeList | ||
| type: string | ||
| description: The map type filter separated by commas | ||
| - name: playable | ||
| type: boolean | ||
| description: Whether the map is validated and playable | ||
| - name: onlyMine | ||
| type: boolean | ||
| description: Whether the map was created by the current authenticated account | ||
| --- | ||
|
|
||
| Retrieves your authenticated account's favorite tracks. | ||
|
|
||
| --- | ||
|
|
||
| **Remarks**: | ||
|
|
||
| - This endpoint is only useful with tokens authenticated through Ubisoft user accounts (as opposed to dedicated server accounts). | ||
| - The `sort` parameter can be set to `"date"` (when the map was added to your favorite tracks) or `"name"` (the map name). | ||
| - When no `mapTypeList` filter is applied, all available maps are returned regardless of their type. | ||
| - See the [glossary](/glossary#map-type) for examples of supported map types. | ||
| - The `timestamp` field is when the map was added to your favorite tracks. | ||
| - This endpoint behaves similarly to the [Live API's Get favorite map endpoint](/live/maps/favorites), but the response data model is different, with the Live endpoint also including additional map information. | ||
|
|
||
| --- | ||
|
|
||
| **Example request**: | ||
|
|
||
| ```plain | ||
| GET https://prod.trackmania.core.nadeo.online/maps/favorites?offset=0&length=1&sort=date&order=desc&mapTypeList=Trackmania\TM_Race&playable=true&onlyMine=false | ||
| ``` | ||
|
|
||
| **Example response**: | ||
|
|
||
| ```json | ||
| { | ||
| "mapFavoriteList": [ | ||
| { | ||
| "accountId": "69f31664-4252-48e0-a433-024c49caee8c", | ||
| "mapUid": "KRelvYHRjEQoqnkJ_Th8FLKzTsg", | ||
| "timestamp": "2026-02-13T20:58:41+00:00" | ||
| } | ||
| ], | ||
| "count": 11 | ||
| } | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| name: Remove favorite map | ||
|
|
||
| url: https://prod.trackmania.core.nadeo.online | ||
| method: DELETE | ||
| route: /maps/favorites | ||
|
|
||
| audience: NadeoServices | ||
|
|
||
| parameters: | ||
| body: | ||
| - name: mapUid | ||
| type: string | ||
| description: The UID of the map | ||
| required: true | ||
| --- | ||
|
|
||
| The request body contains the map to remove, identified by its mapUid: | ||
|
|
||
| ```json | ||
| { | ||
| "mapUid": "{mapUid}" | ||
| } | ||
| ``` | ||
|
|
||
| Removes a map from your authenticated account's favorites. | ||
|
|
||
| --- | ||
|
|
||
| **Remarks**: | ||
|
|
||
| - This endpoint is only useful with tokens authenticated through Ubisoft user accounts (as opposed to dedicated server accounts). | ||
| - This endpoint serves the same purpose as the [Live API's Remove favorite map endpoint](/live/maps/remove-favorite), but the request format is different. | ||
|
|
||
| --- | ||
|
|
||
| **Example request**: | ||
|
|
||
| ```plain | ||
| DELETE https://prod.trackmania.core.nadeo.online/maps/favorites | ||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "mapUid": "KRelvYHRjEQoqnkJ_Th8FLKzTsg" | ||
| } | ||
| ``` | ||
|
|
||
| **Example response**: | ||
|
|
||
| ```plain | ||
| null | ||
| ``` | ||
|
|
||
| Both successful and unsuccessful responses (including requests for maps that are not part of your favorites or don't exist) return a `200` response code. | ||
|
|
||
| An invalid `mapUid` results in a `400` response code with an error object in the response body. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.