knitr::opts_chunk$set( collapse = TRUE, eval = FALSE, comment = "#>" )
The vvtermtime
package provides a convenient way to interact with the Semestry TermTime API in R. This vignette will guide you through the installation process and demonstrate how to authenticate with the Semestry API to start retrieving data.
You can install the vvtermtime
package from GitHub using the following command:
devtools::install_github("vusaverse/vvtermtime")
The goal is to make the package available on CRAN in the near future.
To access the Semestry API, you need an API key and the base URL of your Semestry instance. The authenticate
function allows you to authenticate with the API using these credentials.
library(vvtermtime) # Replace "your_api_key" and "https://semestry.com/" with your actual credentials semestry <- authenticate(api_key = "your_api_key", base_url = "https://semestry.com/api/")
Make sure to replace "your_api_key" with your actual API key provided by Semestry, and "https://semestry.com/" with the appropriate base URL for your Semestry instance.
Once authenticated, you can start retrieving data from the Semestry API using the provided functions. Here are some examples:
To retrieve room data, you can simply pass the semestry
object to the get_rooms
function:
rooms <- get_rooms(semestry)
This will fetch the room data from the Semestry API and store it in the rooms variable.
To retrieve room bookings data, you can use the get_roombookings function:
roomsbookings <- get_roombookings(semestry)
This will fetch the room bookings data from the Semestry API and store it in the room_bookings variable.
This vignette provided a brief overview of the vvtermtime
package and demonstrated how to get started by authenticating with the Semestry TermTime API and retrieving data. You can explore the package further by referring to the function documentation and other available vignettes.
For more information, please visit the vvtermtime
GitHub repository or consult the package documentation.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.