QVGK's TrelloAPI
  • QVGK's TrelloAPI
  • Getting Started
  • API Modules
    • BoardsAPI
      • :GetBoardByID()
    • ListsAPI
      • :GetListID()
    • CardsAPI
      • :GetCardsInList()
      • :GetCardByName()
      • :CreateCard()
      • :DeleteCard()
  • Legacy Versions
    • V0.14
      • Setting Up
      • API Objects
        • ListsAPI
        • CardsAPI
        • BoardsAPI
Powered by GitBook
On this page
  1. API Modules
  2. CardsAPI

:CreateCard()

Create a new card in a list.

Example usage and parameters:

local BoardID = 'w0j1CQz2'
local ListID = ListsAPI:GetListID(BoardID, 'Example List')

local CardName = 'Example Card'
local ExtraData = {
    Description = 'Example Description',
    Labels = {'Label1', 'Label2', 'Label3'}
}

--[[
    @param CardName string -- The name of the card.
    @param ListID string -- The list's ID.
    @param ExtraData array -- Extra data to add to the card.
    @return table or false -- Returns a table of all cards, or false if fails.
--]]
local Card = CardsAPI:CreateCard(CardName, ListID, ExtraData)

print(Card.name)
Previous:GetCardByName()Next:DeleteCard()

Last updated 2 years ago