KamikazeJAM_YT

Test Code For Trello API

Jun 5th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local HTTPService = game:GetService("HttpService")
  2. local TrelloAPI = require(script.TrelloAPI)
  3. local BoardID = TrelloAPI:GetBoardID("TestBoard")
  4. local ListID = TrelloAPI:GetListID("Save",BoardID)
  5.  
  6. local new = HTTPService:JSONEncode(array) --array is my array of data, theres no issue saving, only deleting the card
  7. local title = tostring(plr.UserId)
  8. local old = TrelloAPI:GetCardID(tostring(plr.UserId),BoardID)
  9. if old then
  10.     local ded = TrelloAPI:DeleteCard(old)
  11.     local NewCard = TrelloAPI:AddCard(title,new,ListID)    
  12. else   
  13.     local NewCard = TrelloAPI:AddCard(title,new,ListID)            
  14. end
Advertisement
Add Comment
Please, Sign In to add comment