# The taClient.addTournamentPool() method
This documents the `taClient.addTournamentPool()` method.

<div class="info-box">
    <span class="material-icons">info</span>
    <div>
        <strong>Async:</strong> This is a method you would want to use await with
    </div>
</div>

This method has input parameters. The function could easily be defined as:
```ts
async function addTournamentPool(tournamentId: string, name: string, image: Uint8Array, maps: Map[]): Promise<Response> {
    // backend logic
}
```
`tournamentId` refers to the guid of the tournament.
## General usage:
```ts
const response: Response = taClient.addTournamentPool(tournamentGuid, "Testing Map Pool", convertUrlToUnit8Array('https://png.com/pngPlaceholder'), maps: [map1, map2]);
```
- For the `Map` modal please find documentation at [Modals -> Response](/documentation#Modals/4-Map)
- For `Response` please find documentation at [Modals -> Response](/documentation#Modals/4-Response)

<div class="info-box">
    <span class="material-icons">info</span>
    <div>
        <strong>Note:</strong> Some parameters do not actually have to be provided, but for a complete object to exist you must give it some placeholder value.
    </div>
</div>

A the following properties for the maps may be left empty or as a placeholder value. Do note that these are only from the `maps` array, since not all properties must be defined for the `maps`:
- `map.guid`: may be left as `""`
- `map.gameplayParameters.playerSettings`: may be left as an empty [PlayerSpecificSettings](/documentation#Modals/4-PlayerSpecificSettings) object
- `map.attempts` and `map.showScoreboard` will not have any effect on gameplay, hence they can be left as a placeholder value such as `0` and `false`

If you have not yet, please read [Client -> Introduction to the Client](/documentation#Client/3-client-intro)

```js
{
    details: {
        addTournamentPool: Response_UpdateQualifierEvent,
        oneofKind: 'addQualifierMaps'
    },
    respondingToPacketId: 'packet-guid-uuidv4',
    type: Response_ResponseType
}
```
- For `Response_UpdateQualifierEvent` please find documentation at [Modals -> Request_AddQualifierMaps](/documentation#Modals/4-Request_AddQualifierMaps).

```ts
// this method is called when the user submits the AddOrEditMapModal.svelte form
async function handleMapAdded(event: CustomEvent) {
    // add the single map that the user configured. This includes all settings and data for the map.
    await client.addQualifierMaps(tournamentGuid, qualifierGuid, [event.detail.map]);
    // a local method to just "refresh" the data on the page for reactivity
    fetchQualifierData();
    // a horrible example of how to use confirmations and modals
    // show the popup for "Successfully added the map!"
    modalMessage = `Successfully added the map!`;
    modalIcon = 'check';
    modalButtons = [];
    modalAutoClose = 1;
    showGenericModal = true;
}
```
<div class="info-box">
    <span class="material-icons">info</span>
    <div>
        <strong>Example:</strong> This is a direct example from ShyyTAUI. It comes from the page where users edit qualifiers.
    </div>
</div>