Would the following scripts work to add a card to Trello, with the info given?
Local Script:
local assetId = 4559563722
local MarketPlaceService = game:GetService("MarketplaceService")
local details = MarketPlaceService:GetProductInfo(assetId)
game:GetService("ReplicatedStorage").Give:FireServer(details.Name, game.Players.LocalPlayer.UserId)
Server Script:
local rep = game:GetService("ReplicatedStorage")
local SSS = game:GetService("ServerScriptService")
local API = require(SSS.API)
rep.Give.OnServerEvent:Connect(function(productName, userID)
print("fired")
local user = tostring(userID)
local board = API:GetBoardID("ezHub")
local list = API:GetListID(tostring(productName), board)
API:AddCard("New: "..user, "Desc:"..user,list)
end)
The “No Parameters Found” error is a common one that I got when using Nstrike’s API. I would personally suggest that you transfer your system to the one made by @xelph_rs.
I forgot what the fix to the “No Parameters Found” error was, but I’m going to look through some old projects of mine to see what I did to fix it. It’s probably something simple like an invalid list ID or something.
I tried using this API, but I dont understand how to structure it. Does every script just go as its own module script in ServerScriptService? Is there anything in Toolbox I can simply insert?
If you’re having trouble getting it off of GitHub, I think that they included a place download that had it in SSS. This API works differently, as it has 3 classes, Boards, Lists, and Cards. Each class has a set of functions that you can use with them, which can be found in the documentation on GitHub that I posted below.
If you need an example to get you started, here’s something that I made based off of the documentation for the API.
local API = require(script.Parent.Main)
local Board = API:GetBoardByName("Bondi Rescue Roleplay - Ban Archive Board")
local List = Board:GetListByName("test")
API.new("Card", "Testing!", List)
“Card” is the class name, “Testing!” is the name of the card, and List is the list class that was gotten from the Board. Api.new is not solely used for adding cards, which is why there is no parameter for the description. You could set the description by getting the card with :GetCardByName(), and then using the :SetDesc() function on the Card object.
Since this is an Object-Oriented API, you don’t really work with IDs as you did with Nstrikes API. “Board” is a Board class, and has a set of functions specifically for it, such as :GetListByName()