The Trello integration allows administrators or front-end tooling to produce a structured Trello board for any Proponente in the system at the click of a button. The board gives the Proponente a visual, project-management-friendly overview of all their proposals and the collaborators backing each one — complete with collaboration amounts, return types, and dates. Each proposal becomes a Trello list, and each collaborator becomes a Trello card inside that list.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/17Franco/CulturarteWeb/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
Endpoint:GET /TrelloApi?nick=<proponente_nick>
The servlet performs five steps in sequence:
- Fetches Proponente data from the REST service at
http://<WEB_SERVICES_HOSTR>:<WEB_SERVICES_PORTR><SERVICER>/<nick>. The response is a JSON object containing the Proponente’s nickname and apropCreadasarray. - Creates a Trello board named
"Propuestas de {nick}"viaPOST https://api.trello.com/1/boards/. Default lists are disabled (defaultLists=false). - Creates one Trello list per proposal, named
"{Titulo} {FechaPublicacionString}". - Creates one Trello card per collaboration inside the corresponding proposal list. The card name is the collaborator’s nickname; the card description contains the monto, tipoRetorno, and fechaColaborado.
- Uploads the proposal image (if present) as a file attachment on a dedicated card inside the same list.
Step-by-Step Flow
Call the REST service to get Proponente data
The servlet issues a
GET request to the configured REST endpoint for the given nick. The JSON response includes at minimum:Create the Trello board
A The response contains the new board’s
POST request is sent to the Trello API to create a new board. Default lists are suppressed so the board starts empty.id, which is used in all subsequent list-creation requests.Create one list per proposal
For each entry in The list
propCreadas, a Trello list is created inside the board:id returned is saved for use when creating cards.Create cards for each collaboration
For each element in the proposal’s The card name is the collaborator’s nickname. The card description contains:
aporte array, a Trello card is created inside the proposal’s list:| Line | Field |
|---|---|
Monto: <value> | Amount pledged |
Tipo de retorno: <value> | EntradaGratis or PorcentajeGanancia |
Fecha colaborado: <value> | Date the collaboration was created |
Upload the proposal image as an attachment (if present)
If the proposal has both an Supported image types:
Imagen path and a non-empty img (Base64-encoded bytes), an additional card is created in the list and the image is attached to it..jpg / .jpeg (image/jpeg) and .png (image/png). Any other extension falls back to application/octet-stream.Images are decoded from the Base64 string returned by the REST service, written to a temporary file with
File.createTempFile, and then uploaded to Trello as a multipart attachment. The temporary file is marked deleteOnExit() so it is cleaned up when the JVM exits.Response
On success, the endpoint returns a JSON response body:nick query parameter is missing or empty, the servlet returns immediately with:
Configuration
The Trello API key and token, as well as the REST service host, must be set in~/.Culturarte/config.properties. The same file also holds the SOAP web service coordinates; the Trello-specific keys are separate.
Obtaining Trello Credentials
- Log in to https://trello.com with the account that will own the generated boards.
- Navigate to https://trello.com/app-key to obtain your API Key.
- On the same page, click “Token” to generate a personal API Token for your account.
- Paste both values into
config.propertiesunder the keysAPI_KEYandAPI_TOKEN.
HTTP Timeouts
Image uploads to Trello can take several seconds depending on file size. The servlet overrides the default Unirest timeouts in itsinit() method to prevent premature failures: