Trello API [ReMade] • Use Trello easily in your game!

I never said you that you said to use it as a database, however, from the code and the way you are using it is just like a database.

They are free to do so, but what I’m trying to say is that’s the innocent usage of the service they offer and you are basically promoting it by how you are using your module. Again as I mentioned in my previous reply I wasn’t sure if it was against their TOS but however, but it’s simply common sense at this point that Trello is not a database.

I’m not pointing it out unnecessarily, I’m only doing so since I have a reason. If you scroll up you can see some people using it to store data. I think you should mention that it should not be used as a database on your forum or in some other way.

Hi there, I’m having issues trying to understand how to apply a label and description to a newly created card? Could you please explain this part to me, thanks in advance.

EDIT: I apologize, I didn’t read the post properly. I’m all good now.

2 Likes

This isn’t quite working for me, this is my current code:

local newcard = TrelloAPI.CardsAPI.CreateCard("Isenashi", ArrestedList, {
	["Description"] = "Murdered a dude at some point idfk.",
	["idLabels"] = {'6375f0738291ac8742809a58', "6375f0738291ac8742809a60"},
})

print('added new card!')

wait(5)

TrelloAPI.CardsAPI.UpdateCard("Isenashi", {
	["Name"] = "Isenashi",
	["Description"] = "Murdered a dude at some point idfk. Now released under dumb stuff.",
	["idLabels"] = {'6375f0738291ac8742809a58', "6375f0738291ac8742809a63"},
	["Closed"] = false,
	["idList"] = "Criminal Records",
})

print('updated the new card!')

It doesn’t move the card to the new list, update the description, or even add the new label.

Hi! Thank you for this amazing API! It’s alot of fun to find out what I can do with it.
I was wondering if I could show the expiration date
of a card in a textlabel. I mean for example you are banned until tomorrow, it will show the amount of hours and minutes left until the expiration date has completed.
If this isn’t possible, could you consider adding it? Thank you!

Edit: Also, Is it possible to check if there is a card in a list with the same name? I want to track in-game time and I got it working but it creates a new card everytime I join the game as it’s inside the PlayerAdded function. I want to check if there already is a card with the players name but I’m not sure how.

Hi @Rick007110 Thanks for your suggestion, I will consider it in the future if i updates this API.

Yes of course you can check that a card is already inside the list, using GetCardOnList(ListId, CardName) This will return a boolean wich can be used to know if card exists in that list

1 Like

So I can just use GetCardsOnList() and then do if CardName then statement to tell the script it’s already there? Alright thank you!!

Yes you can do that if you want or simply use GetCardOnList(ListId, CardName) not GetCardsOnList() wich do the same thing but inside API, But it just check that card name is eguale to the 2nd the parameter you insert on that function “CardName”

Hi, I wonder how to get an id of a list?

You can get it by using: GetListID()

Hiya again! Is there a way to get a number on the amount of cards in a list?

Hi There, Yes you can get it by putting # in front of the card list that the api returns, Otherwise you can lop all cards and increment a counter.
Honestly this is not really API related, it’s just basic knowledge of the LUA language.

can I add a card from the module or do I have to do it manually

1 Like

if you want to add a cart to a list you can use CreateCard(Name,ListId,BoardOptionalData) function

Can I add more than one data in boardoptionaldata or is it only one

Just run the function multiple time with a cicle , make sure to respects TrelloAPI limits

I tried doing it but it said card id not found

I did

Local variable when creating a new card and I use it as an id

if you are using create card function why do you need card id?

You are not explaining yourself well.

so I can add more details on the card, and sorry for not explaining well

You can add 4 Different Details: Name (Name of the card) , Description (Card Description), idLabels (Id of labels you want to add and AttachmentLink (An optional Attachment).

What else do you want to add to a card?

I have thought of that, I wanna ask another thing

Trello has a feature where you could make a button and when pressed it will send an email, does it work if I use the API to interact with the button