item_upsert | R Documentation |
Either creates or updates (if item already exists)
item_upsert(parent_id = user_id(), title = NULL, ..., info = NULL)
parent_id |
An |
title |
The title of the new SB item |
... |
Additional parameters are passed on to |
info |
(optional) list of metadata info for the new item |
An object of class sbitem
## Not run:
# helper function to make a random name
aname <- function() paste0(sample(letters, size = 5, replace = TRUE), collapse = "")
# Create an item - by default we use your user ID
(x <- item_upsert(title = aname()))
# Call item_upsert again, updates this time
item_upsert(x, info = list(
contacts = list(list(name = "Suzy"))
)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.