if (FALSE) {
# Get token with write access
key = Sys.getenv("MY_TRELLO_KEY")
secret = Sys.getenv("MY_TRELLO_SECRET")
token = get_token("my_app", key = key, secret = secret,
scope = c("read", "write"))
# Get board ID
url = "Your board URL"
bid = get_id_board(url, token)
# Get cards and extract ID of the first one
cid = get_board_cards(bid, token)$id[1]
# Content for the new card
payload = list(
id = cid,
name = "A new card name",
desc = "Description - updated by trelloR",
pos = "top" #put card on the top of a list
)
# Update card's name, descriptionand position
update_resource("card", id = cid, body = payload, token = token)
}
Run the code above in your browser using DataLab