We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello!
A simple fix is required to the get_announcements function.
Currently, the url is created per: url <- paste0(canvas_url(), "announcements")
This however, lacks a "/" before "announcements", causing a 404 not found error.
A workaround is to create your own function with the adjustment:
get_announcements2 <- function(course_id, start_date = NULL, end_date = NULL, active_only = FALSE) { if (!grepl(pattern = "course", x = course_id)) { course_id <- paste0("course_", course_id) } url <- paste0(rcanvas:::canvas_url(),"/", "announcements") # the added slash is the fix args <- list(per_page = 100) include <- rcanvas:::iter_args_list(course_id, "context_codes[]") include2 <- rcanvas:::iter_args_list(start_date, "start_date") include3 <- rcanvas:::iter_args_list(end_date, "end_date") args <- c(args, include, include2, include3) dat <- rcanvas:::process_response(url, args) dat }
The text was updated successfully, but these errors were encountered:
Hello! A simple fix is required to the get_announcements function. Currently, the url is created per: url <- paste0(canvas_url(), "announcements") This however, lacks a "/" before "announcements", causing a 404 not found error. A workaround is to create your own function with the adjustment: get_announcements2 <- function(course_id, start_date = NULL, end_date = NULL, active_only = FALSE) { if (!grepl(pattern = "course", x = course_id)) { course_id <- paste0("course_", course_id) } url <- paste0(rcanvas:::canvas_url(),"/", "announcements") # the added slash is the fix args <- list(per_page = 100) include <- rcanvas:::iter_args_list(course_id, "context_codes[]") include2 <- rcanvas:::iter_args_list(start_date, "start_date") include3 <- rcanvas:::iter_args_list(end_date, "end_date") args <- c(args, include, include2, include3) dat <- rcanvas:::process_response(url, args) dat }
I am a bit jammed now, but I will add your function asap when I find the time to test it
Sorry, something went wrong.
No branches or pull requests
Hello!
A simple fix is required to the get_announcements function.
Currently, the url is created per:
url <- paste0(canvas_url(), "announcements")
This however, lacks a "/" before "announcements", causing a 404 not found error.
A workaround is to create your own function with the adjustment:
The text was updated successfully, but these errors were encountered: