The vvcanvas package is designed to interact with the
Canvas Learning Management System (LMS) API. This vignette provides a
basic guide on how to authenticate, retrieve course information, and
fetch specific details using the package.
To install the vvcanvas package, you can use the
following command:
install_github("vusaverse/vvcanvas")
library(vvcanvas)To start using the package, you need to authenticate with the Canvas LMS API using your API key and base URL. Here’s an example of how to authenticate:
# Replace the placeholders with your API key and base URL
api_key <- "YOUR_API_KEY"
base_url <- "https://your_canvas_domain.com"
# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate(api_key, base_url)Once authenticated, you can retrieve course information using the get_courses function. Here’s an example:
# Fetch the dataframe of courses
courses <- get_courses(canvas)
head(courses)The vvcanvas package provides various functions to fetch
specific details. For example, to retrieve the assignments within a
course, you can use the get_assignments function:
# Replace the placeholder with the desired course ID
course_id <- 12345
# Fetch the assignments for the course
assignments <- get_assignments(canvas, course_id)
head(assignments)