R/zotero_nr_of_items.R

Defines functions zotero_nr_of_items

Documented in zotero_nr_of_items

#' Get number of items in a public Zotero group
#'
#' @param group The group ID
#'
#' @return The umber of items as a numeric vector.
#' @export
#'
#' @examples zotero_nr_of_items(2425237);
zotero_nr_of_items <- function(group) {
  bibCon <- url(paste0("https://api.zotero.org/groups/", group, "/items?format=keys"));
  keys<-readLines(bibCon, warn=FALSE);
  close(bibCon);
  return(length(keys));
}

Try the ufs package in your browser

Any scripts or data that you put into this service are public.

ufs documentation built on May 29, 2024, 10:30 a.m.