inst/scratch/2025-04-16-firehose-scratch.R

from_timestamp <- as.POSIXct(Sys.Date() - 1)
to_timestamp <- Sys.time()

from_date <- Sys.Date() - 1
to_date <- Sys.Date()

client <- connect()

u1 <- get_usage(client, from = from_timestamp, to = to_timestamp)
u2 <- get_usage(client, from = from_date, to = to_date)

min(u1$timestamp)
max(u1$timestamp)

min(u2$timestamp)
max(u2$timestamp)

Try the connectapi package in your browser

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

connectapi documentation built on Aug. 9, 2025, 1:09 a.m.