Not Including/Ignoring Parameters

I am trying to use Trello API to just move a card to a different list, and keep the title and description the same, and am not entirely sure how I would go about it, since they are required parameters in the function. Is there a way you can ignore parameters and keep them the same?

function unban(listname, username)
local list = API:GetListID(listname, BoardID)
local card = API:GetCardID(username, BoardID)
API:EditCard(card, --card title, card description)
end

I have tried setting them to nil values, but it cannot concatenate the string with a nil value when making the URL.

To clear the description, just use [variable] or [value to change when it is nil]

API:EditCard(card, name, list or "")

I am trying to keep the description and title the same, but only clear the list.

[CardID],
[Name],
[Decription],
[List ID],
Optional[AddUrl],
Optional[Position],
Optional[Due - Default=nil],
Optional[Label]

These are all of the parameters for EditCard.

I don’t get what you mean, I guess this is what you mean: Clearing the list (Remove all cards) but keeping description and names of those cards?

I mean moving the card to a different list, but keeping the name and description the same. I don’t know why I said clear the list sorry.

Oh I now get what you mean. In this case, I suggest you to use another TrelloAPI as it got more functions such as moving cards into another list

2 Likes

Thank you! I checked out the API you linked and it worked for my needs.

1 Like