-
Notifications
You must be signed in to change notification settings - Fork 11
Document more club endpoints #36
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
22 commits
Select commit
Hold shift + click to select a range
55fd4cc
Room password endpoint
Fort-TM 2fe05a7
Join link endpoint
Fort-TM 0d58c4d
Activity endpoints
Fort-TM 19dbd12
Campaign endpoints
Fort-TM 6ca4af2
Create folder endpoint
Fort-TM 8fe64d9
Room endpoints
Fort-TM c5de807
Member endpoints
Fort-TM a81504a
News endpoints
Fort-TM aff84d1
Club endpoints
Fort-TM 2ebb06b
Pin and tag endpoints
Fort-TM 82a9bf2
VIP endpoints
Fort-TM 876b595
Ranking endpoint
Fort-TM cf091e9
Map review endpoints
Fort-TM 124f41f
Member requests endpoint
Fort-TM 276ff81
Upload activities endpoints
Fort-TM 54d763d
Club leaderboard endpoints
Fort-TM e6b9ba1
Club track review submissions endpoints
Fort-TM fa6068e
Clean up parameters / remarks
Fort-TM 97ce210
Address comments
Fort-TM 21005fe
Update remarks
Fort-TM c4c0053
Move files to new club management folder
Fort-TM 9458320
Update remarks to reflect new management folder
Fort-TM 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
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,91 @@ | ||
| --- | ||
| name: Add items to club upload activity | ||
|
|
||
| url: https://live-services.trackmania.nadeo.live | ||
| method: POST | ||
| route: /api/token/club/{clubId}/bucket/{bucketId}/add | ||
|
|
||
| audience: NadeoLiveServices | ||
|
|
||
| parameters: | ||
| path: | ||
| - name: clubId | ||
| type: integer | ||
| description: The ID of the club the upload activity belongs to | ||
| required: true | ||
| - name: bucketId | ||
| type: integer | ||
| description: The ID of the upload activity where the items should be added | ||
| required: true | ||
| body: | ||
| - name: itemIdList | ||
| type: string[] | ||
| description: A list of items to add to the upload activity, identified by their ID (see remarks below) | ||
| required: true | ||
| --- | ||
|
|
||
| The request body is an object containing the items to be added: | ||
|
|
||
| ```json | ||
| { | ||
| "itemIdList": itemIdList | ||
| } | ||
| ``` | ||
|
|
||
| Adds a list of maps, items, or skins to an upload activity in a club. | ||
|
|
||
| --- | ||
|
|
||
| **Remarks**: | ||
|
|
||
| - This endpoint is only useful with tokens authenticated through Ubisoft user accounts (as opposed to dedicated server accounts). | ||
| - The IDs needed for the `itemIdList` parameter depend on the type of upload activity requested. For maps uploads, it requires their `mapUid`, while skins and items require their `skinID` and `itemID`, respectively. | ||
| - When passing an invalid ID, including IDs for other upload types, the items will be added, but an error might be displayed in-game when accessing the activity. | ||
| - Assets used for this endpoint must be uploaded to Nadeo's servers beforehand. | ||
|
|
||
| --- | ||
|
|
||
| **Example request**: | ||
|
|
||
| ```plain | ||
| POST https://live-services.trackmania.nadeo.live/api/token/club/103034/bucket/1009342/add | ||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "itemIdList": [ | ||
| "KRelvYHRjEQoqnkJ_Th8FLKzTsg", | ||
| "3LRPuWYIe85IJBbUcmIHkaSBuHh" | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| **Example response**: | ||
|
|
||
| ```plain | ||
| Items added. | ||
| ``` | ||
|
|
||
| If the club does not exist or the authenticated account is not a member of the club, the response will contain an error: | ||
|
|
||
| ```json | ||
| [ | ||
| "clubMemberRole:error-notMember" | ||
| ] | ||
| ``` | ||
|
|
||
| If the upload activity does not exist, the response will contain an error: | ||
|
|
||
| ```json | ||
| [ | ||
| "activity:error-notFound" | ||
| ] | ||
| ``` | ||
|
|
||
| If the authenticated account does not have enough permissions in the club to edit upload activities, the response will contain an error: | ||
|
|
||
| ```json | ||
| [ | ||
| "clubMemberRole:error-notContentCreator" | ||
| ] | ||
| ``` | ||
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,196 @@ | ||
| --- | ||
| name: Create club campaign | ||
|
davidbmaier marked this conversation as resolved.
|
||
|
|
||
| url: https://live-services.trackmania.nadeo.live | ||
| method: POST | ||
| route: /api/token/club/{clubId}/campaign/create | ||
|
|
||
| audience: NadeoLiveServices | ||
|
|
||
| parameters: | ||
| path: | ||
| - name: clubId | ||
| type: integer | ||
| description: The ID of the club where the campaign should be created | ||
| required: true | ||
| body: | ||
| - name: name | ||
| type: string | ||
| description: The name of the new campaign | ||
| max: 20 characters | ||
| required: true | ||
| - name: playlist | ||
|
davidbmaier marked this conversation as resolved.
|
||
| type: object[] | ||
| description: A list of maps, with their positions and UIDs | ||
| children: | ||
| - name: position | ||
| type: integer | ||
| description: The position of the map in the campaign (see remarks below) | ||
| - name: mapUid | ||
| type: string | ||
| description: The UID of a specific map | ||
|
Fort-TM marked this conversation as resolved.
|
||
| - name: folderId | ||
| type: integer | ||
| description: The ID of the folder where the campaign should be created | ||
|
Fort-TM marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| The request body is an object containing the campaign details: | ||
|
|
||
| ```json | ||
| { | ||
| "name": name, | ||
| "playlist": [ | ||
| { | ||
| "position": position, | ||
| "mapUid": mapUid | ||
| } | ||
| ], | ||
| "folderId": folderId | ||
| } | ||
| ``` | ||
|
|
||
| Creates a campaign in a club. | ||
|
|
||
| --- | ||
|
|
||
| **Remarks**: | ||
|
|
||
| - This endpoint is only useful with tokens authenticated through Ubisoft user accounts (as opposed to dedicated server accounts). | ||
| - Campaigns created using this endpoint will be deactivated by default. To activate them, use the [Edit activity Live endpoint](/live/club-management/edit-activity.md). | ||
| - The position of the maps in the campaign seems to be determined by their order in the `playlist` array in the request body, rather than by their `position` parameter. It is still recommended to pass the desired position. | ||
| - If a map is missing its `mapUid` or `position`, the campaign will be created, but the map will be skipped. | ||
| - Maps used for this endpoint must be uploaded to Nadeo's servers beforehand. | ||
| - As of 2024-01-17, this endpoint's response links to `.dds` media files by default, while several scaled `.png`/`.jpg` versions are available using separate fields (see example below for reference). This only applies for custom media files, and not for preset themes. | ||
| - See the [glossary](/glossary#club-folders) for more information about folders. | ||
|
|
||
| --- | ||
|
|
||
| **Example request**: | ||
|
|
||
| ```plain | ||
| POST https://live-services.trackmania.nadeo.live/api/token/club/103034/campaign/create | ||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "name": "RPG", | ||
| "playlist": [ | ||
| { | ||
| "position": 0, | ||
| "mapUid": "zx45UUBTayedFisP7N_wYWZa3Ih" | ||
| }, | ||
| { | ||
| "position": 1, | ||
| "mapUid": "XiynRhPNCztF7UeXGa7bmYL32xm" | ||
| } | ||
| ], | ||
| "folderId": 0 | ||
| } | ||
| ``` | ||
|
|
||
| **Example response**: | ||
|
|
||
| ```json | ||
| { | ||
| "creationTimestamp": 1771654457, | ||
| "clubName": "Fort's club", | ||
| "id": 1004334, | ||
| "clubDecalUrl": "", | ||
| "publicationTimestamp": 1771654457, | ||
| "activityId": 1004334, | ||
| "campaignId": 127119, | ||
| "name": "RPG", | ||
| "clubId": 103034, | ||
| "mediaUrlPngSmall": "", | ||
| "mediaUrl": "", | ||
| "latestEditorAccountId": "69f31664-4252-48e0-a433-024c49caee8c", | ||
| "mediaUrlPngLarge": "", | ||
| "campaign": { | ||
| "day": -1, | ||
| "id": 127119, | ||
| "video": false, | ||
| "publicationTimestamp": 1771654457, | ||
| "monthDay": -1, | ||
| "color": "", | ||
| "name": "RPG", | ||
| "clubId": 103034, | ||
| "month": -1, | ||
| "endTimestamp": 0, | ||
| "monthYear": -1, | ||
| "rankingSentTimestamp": null, | ||
| "mediaUrl": "", | ||
| "startTimestamp": 1771654457, | ||
| "editionTimestamp": 1771654457, | ||
| "leaderboardGroupUid": "NLS-jZ46Fn4oNK9KLokxwvMLMo0bOwQFca1Dq0A", | ||
| "seasonUid": "NLS-jZ46Fn4oNK9KLokxwvMLMo0bOwQFca1Dq0A", | ||
| "categories": [ | ||
| { | ||
| "name": "RPG", | ||
| "position": 0, | ||
| "length": 5 | ||
| } | ||
| ], | ||
| "year": -1, | ||
| "media": { | ||
| "decalUrl": "", | ||
| "popUpImageUrl": "", | ||
| "liveButtonForegroundUrl": "", | ||
| "liveButtonBackgroundUrl": "", | ||
| "buttonBackgroundUrl": "", | ||
| "popUpBackgroundUrl": "", | ||
| "buttonForegroundUrl": "" | ||
| }, | ||
| "published": true, | ||
| "useCase": 2, | ||
| "playlist": [ | ||
| { | ||
| "id": 1516902, | ||
| "mapUid": "zx45UUBTayedFisP7N_wYWZa3Ih", | ||
| "position": 0 | ||
| }, | ||
| { | ||
| "id": 1516903, | ||
| "mapUid": "XiynRhPNCztF7UeXGa7bmYL32xm", | ||
| "position": 1 | ||
| } | ||
| ], | ||
| "week": -1, | ||
| "latestSeasons": [ | ||
| { | ||
| "uid": "NLS-jZ46Fn4oNK9KLokxwvMLMo0bOwQFca1Dq0A", | ||
| "campaignId": 127119, | ||
| "name": "RPG", | ||
| "endTimestamp": 0, | ||
| "startTimestamp": 1771654457, | ||
| "relativeEnd": 0, | ||
| "active": true, | ||
| "relativeStart": 0 | ||
| } | ||
| ] | ||
| }, | ||
| "mediaTheme": "", | ||
| "popularityLevel": 0, | ||
| "creatorAccountId": "69f31664-4252-48e0-a433-024c49caee8c", | ||
| "mediaUrlDds": "", | ||
| "mapsCount": 2, | ||
| "mediaUrlPngMedium": "" | ||
| } | ||
| ``` | ||
|
|
||
| If the club does not exist or the authenticated account is not a member of the club, the response will contain an error: | ||
|
|
||
| ```json | ||
| [ | ||
| "clubMemberRole:error-notMember" | ||
| ] | ||
| ``` | ||
|
|
||
| If the authenticated account does not have enough permissions in the club to create campaigns, the response will contain an error: | ||
|
|
||
| ```json | ||
| [ | ||
| "clubMemberRole:error-notContentCreator" | ||
| ] | ||
| ``` | ||
|
|
||
| An invalid or duplicated `mapUid` results in a `500` response code with an error object in the response body. | ||
Oops, something went wrong.
Oops, something went wrong.
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.