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
<- "YOUR_API_KEY"
api_key <- "https://your_canvas_domain.com"
base_url
# Authenticate with the Canvas LMS API
<- canvas_authenticate(api_key, base_url) canvas
Once authenticated, you can retrieve course information using the get_courses function. Here’s an example:
# Fetch the dataframe of courses
<- get_courses(canvas)
courses
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
<- 12345
course_id
# Fetch the assignments for the course
<- get_assignments(canvas, course_id)
assignments head(assignments)