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.
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
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 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.
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).