Skip to contents

Fetch details about coworking sessions

Usage

cw_details(which = "next")

Arguments

which

Character/Date. "next" to fetch details on the next coworking session, "last" to fetch details on the last scheduled (in future) coworking session, or a Date fetch details for a specific coworking session.

Value

Data frame with coworking event details

Examples

cw_details()
#> Error in (function (endpoint, ..., per_page = NULL, .per_page = NULL,     .token = NULL, .destfile = NULL, .overwrite = FALSE, .api_url = NULL,     .method = "GET", .limit = NULL, .accept = "application/vnd.github.v3+json",     .send_headers = NULL, .progress = TRUE, .params = list(),     .max_wait = 600, .max_rate = NULL) {    params <- c(list(...), .params)    params <- drop_named_nulls(params)    check_exclusive(per_page, .per_page, .require = FALSE)    per_page <- per_page %||% .per_page    if (is.null(per_page) && !is.null(.limit)) {        per_page <- max(min(.limit, 100), 1)    }    if (!is.null(per_page)) {        params <- c(params, list(per_page = per_page))    }    req <- gh_build_request(endpoint = endpoint, params = params,         token = .token, destfile = .destfile, overwrite = .overwrite,         accept = .accept, send_headers = .send_headers, max_wait = .max_wait,         max_rate = .max_rate, api_url = .api_url, method = .method)    if (req$method == "GET")         check_named_nas(params)    raw <- gh_make_request(req)    res <- gh_process_response(raw, req)    len <- gh_response_length(res)    if (.progress && !is.null(.limit)) {        pages <- min(gh_extract_pages(res), ceiling(.limit/per_page))        cli::cli_progress_bar("Running gh query", total = pages)        cli::cli_progress_update()    }    while (!is.null(.limit) && len < .limit && gh_has_next(res)) {        res2 <- gh_next(res)        len <- len + gh_response_length(res2)        if (.progress)             cli::cli_progress_update()        if (!is.null(names(res2)) && identical(names(res), names(res2))) {            res3 <- mapply(function(x, y, n) {                z <- c(x, y)                atm <- is.atomic(z)                if (atm && n %in% c("total_count", "incomplete_results")) {                  y                }                else if (atm) {                  unique(z)                }                else {                  z                }            }, res, res2, names(res), SIMPLIFY = FALSE)        }        else {            res3 <- c(res, res2)        }        attributes(res3) <- attributes(res2)        res <- res3    }    if (.progress)         cli::cli_progress_done()    if (!is.null(.limit) && len > .limit && !"total_count" %in%         names(res) && length(res) == len) {        res_attr <- attributes(res)        res <- res[seq_len(.limit)]        attributes(res) <- res_attr    }    res})(endpoint = r, state = state, labels = labels, since = since,     issue = issue, sort = "created", direction = "desc", owner = owner,     repo = repo, .limit = Inf): GitHub API error (404): Not Found
#>  URL not found:
#>   <https://api.github.com/repos/rosadmin/comms/issues?state=open&labels=coworking&sort=created&direction=desc&per_page=100>
#>  Read more at
#>   <https://docs.github.com/rest/issues/issues#list-repository-issues>
cw_details("2023-11")
#> Error in (function (endpoint, ..., per_page = NULL, .per_page = NULL,     .token = NULL, .destfile = NULL, .overwrite = FALSE, .api_url = NULL,     .method = "GET", .limit = NULL, .accept = "application/vnd.github.v3+json",     .send_headers = NULL, .progress = TRUE, .params = list(),     .max_wait = 600, .max_rate = NULL) {    params <- c(list(...), .params)    params <- drop_named_nulls(params)    check_exclusive(per_page, .per_page, .require = FALSE)    per_page <- per_page %||% .per_page    if (is.null(per_page) && !is.null(.limit)) {        per_page <- max(min(.limit, 100), 1)    }    if (!is.null(per_page)) {        params <- c(params, list(per_page = per_page))    }    req <- gh_build_request(endpoint = endpoint, params = params,         token = .token, destfile = .destfile, overwrite = .overwrite,         accept = .accept, send_headers = .send_headers, max_wait = .max_wait,         max_rate = .max_rate, api_url = .api_url, method = .method)    if (req$method == "GET")         check_named_nas(params)    raw <- gh_make_request(req)    res <- gh_process_response(raw, req)    len <- gh_response_length(res)    if (.progress && !is.null(.limit)) {        pages <- min(gh_extract_pages(res), ceiling(.limit/per_page))        cli::cli_progress_bar("Running gh query", total = pages)        cli::cli_progress_update()    }    while (!is.null(.limit) && len < .limit && gh_has_next(res)) {        res2 <- gh_next(res)        len <- len + gh_response_length(res2)        if (.progress)             cli::cli_progress_update()        if (!is.null(names(res2)) && identical(names(res), names(res2))) {            res3 <- mapply(function(x, y, n) {                z <- c(x, y)                atm <- is.atomic(z)                if (atm && n %in% c("total_count", "incomplete_results")) {                  y                }                else if (atm) {                  unique(z)                }                else {                  z                }            }, res, res2, names(res), SIMPLIFY = FALSE)        }        else {            res3 <- c(res, res2)        }        attributes(res3) <- attributes(res2)        res <- res3    }    if (.progress)         cli::cli_progress_done()    if (!is.null(.limit) && len > .limit && !"total_count" %in%         names(res) && length(res) == len) {        res_attr <- attributes(res)        res <- res[seq_len(.limit)]        attributes(res) <- res_attr    }    res})(endpoint = r, state = state, labels = labels, since = since,     issue = issue, sort = "created", direction = "desc", owner = owner,     repo = repo, .limit = Inf): GitHub API error (404): Not Found
#>  URL not found:
#>   <https://api.github.com/repos/rosadmin/comms/issues?state=open&labels=coworking&sort=created&direction=desc&per_page=100>
#>  Read more at
#>   <https://docs.github.com/rest/issues/issues#list-repository-issues>