Greetings, Developers.
Recently, I started moving my application center on Trello API, which seems to store data much better than ROBLOX DataStores.
But when I am trying to do certain functions, nothing is being made.
Basic information:
- Script I am writing is located in
game.ServerScriptService
;
- Trello API is located in
game.ServerScriptService
;
- Trello API is setup correctly, which can be proven by some of functions being able to work.
local TrelloAPI = require(game.ServerScriptService.TrelloAPI)
local SCPFBoard = TrelloAPI:GetBoardID("SCPF | Application Center")
local L0PendingListID = TrelloAPI:GetListID("Pending | Level-0", SCPFBoard)
local PendingL0Applications = {}
function GetAllPendingCards()
for i,Card in pairs(TrelloAPI:GetCardsInList(L0PendingListID)) do
print(Card["name"])
print(Card["id"])
table.insert(PendingL0Applications,{Author = Card["name"],CardID = Card["id"]})
end
end
GetAllPendingCards()
wait(1)
TrelloAPI:AddCard("Name","Desc",L0PendingListID)
I tried to add print callbacks, which shown the following:
- Everything till the
TrelloAPI:AddCard()
is working.
I have no idea of what can be wrong.
1 Like
AddCard uses a table, not multiple arguments.
So it would be
TrelloAPI:AddCard({
"Name",
"Desc"
,L0PendingListID
})
or
TrelloAPI:AddCard({"Name", "Desc", L0PendingListID})
for short
Nope, including tables did an error here - “No parametres found”.
When I used it without a table, it was not appearing.
I tried to put print callbacks and got the following:
That did not change even after ten minutes of me waiting.
P.S. “Hmmm” is a Card name, which proves that Trello API receiving works correctly.
Red squares are Card IDs.
Make sure you have all permissions granted to the “bot”. You can have GET permissions but not POST. It should ask you which ones you want to grant when adding it.
FUTURE REFERENCE POST
Actually Trello is not a good use for a database. It’s notorious for going down and easily being exploited. It’s used for organization not a database. If you want to store data, use ROBLOX’s datastore, which is actually backed up and is local to ROBLOX. Applications aren’t needed to be stored if you are just reviewing them, in that case I’d recommend using Trello. However if you want to store them, use the datastore.
1 Like
The “bot” is linked to the account holding the application center itself, meaning it has all permissions over the Trello Board.
Applications are supposed to be held on the Pending list until they are reviewed, once they are, they are supposed to be brought over to “Failed” or “Passed” lists, depending on the result.
I did try using datastores for the application center, and in my opinion, Trello is most fitting the Application Center.
Actually it was my mistake. I did try reviewing the link I did use to give access to the API and you were right, I forgot to include write permission on it.
Thank you for the help.