Files
homekeeper/listkeeper/R/db_items.R
T
2026-07-06 19:25:38 +02:00

16 lines
454 B
R

db_items_by_list <- function(db, list_id) {
api_get(db, paste0("/v1/lists/", list_id, "/items"))
}
db_items_insert <- function(db, list_id, text) {
api_post(db, paste0("/v1/lists/", list_id, "/items"), list(text = text))
}
db_items_set_checked <- function(db, id, checked) {
api_patch(db, paste0("/v1/lists/items/", id), list(checked = isTRUE(checked)))
}
db_items_delete <- function(db, id) {
api_delete(db, paste0("/v1/lists/items/", id))
}