Skip to content

Commit

Permalink
add: course_id columns in folders output
Browse files Browse the repository at this point in the history
  • Loading branch information
tin900 committed May 1, 2024
1 parent 033aefa commit e039092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/get_course_folders.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ get_course_folders <- function(canvas, course_id, per_page = 100) {

# Parse the response as JSON
folders <- httr::content(response, "text", encoding = "UTF-8") %>%
jsonlite::fromJSON(flatten = TRUE)
jsonlite::fromJSON(flatten = TRUE) %>%
as.data.frame() %>%
mutate(course_id = course_id)

# Return the data frame of folders
return(folders)
Expand Down

0 comments on commit e039092

Please sign in to comment.