Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,35 @@ Endpoints that accept a matchmaking type should also accept a string in its plac
### Zone ID

UUID that identifies a zone. The full list of zones (including their hierarchical structure) is available via the [Core API's zones endpoint](/core/meta/zones).

### Club privacy levels

Privacy levels for new members that can be set when creating / editing a club. These include:

* `"public"`: Public - Open to everyone. Allows everyone to join the club directly.
* `"private-open"`: Private - Accept requests. Players can request to join the club in-game. Requests need to be approved by a moderator.
* `"private-closed"`: Private. The club does not accept new members. The club will still be visible in-game.

### Room regions

Server regions where a room can be hosted. This can be set when creating / editing a club room. Regions include:

* `"eu-west"`: EU West.
* `"ca-central"`: Canada Central.
* `"ap-southeast"`: Asia Pacific.

### Club upload activity types

Activity types supported for assets when creating a club upload activity. These include:

* `"map-upload"`: Track uploads.
* `"skin-upload"`: Skin uploads.
* `"item-upload"`: Item collections. A group of items that players can add to their map editor in-game.

Item collections need to be compressed as a .zip file and placed in the `ItemCollections` folder in the Trackmania Documents folder.

### Club folders

Folders in clubs that can be used to organize activities. Nested folders are supported.

If the folder ID of an activity is set to `0`, the activity will be moved outside the folder. Similarly, deleting a folder will move the activities outside it.
91 changes: 91 additions & 0 deletions docs/live/club-management/add-to-upload.md
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.
Comment thread
Fort-TM marked this conversation as resolved.
- 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"
]
```
196 changes: 196 additions & 0 deletions docs/live/club-management/create-campaign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
---
name: Create club campaign
Comment thread
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
Comment thread
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
Comment thread
Fort-TM marked this conversation as resolved.
- name: folderId
type: integer
description: The ID of the folder where the campaign should be created
Comment thread
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.
Loading
Loading