# Schede API

**Come posso accedere alle funzioni di questa categoria?**

**\[ 1 ] -** Apri un ServerScript\
\&#xNAN;**\[ 2 ] -** Osserva il seguente script\
(Esempio di script per capire come accedere ad una categoria e ad una funzione)

```lua
-- // Richiedi TrelloAPI Modulo
local TrelloAPI = require(game.ServerScriptService:WaitForChild("TrelloAPI"))

-- // Accedi alla categoria
TrelloAPI.CardsAPI.[NomeFunzione]
```

### CreateCar&#x64;**(**&#x4E;ame, ListId, BoardOptionalDat&#x61;**)** <a href="#getboardid" id="getboardid"></a>

Crea una scheda specifica in una lista, Ritorna `true` se la funzione va a buon fine `false`se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.CreateCard("NOME_CARD_ESEMPIO", "ID_LISTA", {
	["Description"] = "Descrizione Scheda", --> Type: String
	["idLabels"] = {'IdLabel1','IdLabel1'},  --> Type: Array (Table)
	["AttachmentLink"] = "https://roblox.com" --> Type: String
  })
```

{% hint style="info" %}
Tieni presente che puoi rimuovere uno di questi elementi o semplicemente non includere la tabella **"BoardOptionalData**".
{% endhint %}

### UpdateCard(CardId, BoardOptionalData)

Aggiorna una scheda esistente, Ritorna `true` se la funzione va a buon fine `false`se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.UpdateCard("ID_LISTA", {
   ["Name"] = "NOME_CARD_NUOVA", --> Type: String
   ["Description"] = "DESCRIZIONE_NUOVA", --> Type: String
   ["idLabels"] = {"ID1","ID2"}, --> Type: Array (Table)
   ["Closed"] = true || false --> Type: Boolean (Table),
   ['idList'] = "Nuova Lista Id" --> Trasferisci in una nuova lista
})
```

{% hint style="info" %}
Tieni presente che puoi rimuovere uno di questi elementi o semplicemente non includere la tabella **"BoardOptionalData**".
{% endhint %}

### DeleteCard(CardId)

Elimina dall'elenco una carta esistente,Ritorna `true` se la funzione va a buon fine `false`se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.DeleteCard("CARD_ID")
```

### CreateAttachmentOnCard(CardId,AttachmentUrl)

Crea un Allegato su una carta specifica, Solo gli URL sono supportati,  Ritorna `true` se la funzione va a buon fine `false`se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.CreateAttachmentOnCard("CARD_ID","https://www.example.com")
```

### DeleteAttachmentOnCard(CardId,Attachmentid)

Elimina un allegato da una card esistente, Ritorna `true` se la funzione va a buon fine `false`se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.DeleteAttachmentOnCard("CARD_ID", "ID_ATTACHMENT")
```

### GetCardOnList(BoardId,CardName)

Trova una card specifica, se trova ritorna l'id di essa,  Ritorna `false` se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.GetCardOnList("BOARD_ID", "CARD_EXAMPLE_NAME")
```

### GetCardsOnList(ListId)

Restituisci tutte le carte della lista,  Ritorna `false` se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.GetCardsOnList("LIST_ID")
```

### GetAttachmentsOnCard(CardId)

Restituisci i dati degli allegati per la carta,  Ritorna `false` se la funzione fallisce.

```lua
TrelloAPI.CardsAPI.GetAttachmentsOnCard("CARD_ID")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://inceptionstrange.gitbook.io/trelloapi/documentation-it/api-startup-and-documentazione/schede-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
