Skip to content

Commit

Permalink
update: README and vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
tin900 committed Jan 12, 2024
1 parent ecedbd3 commit 4f91f54
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,20 @@ library(vvcanvas)

# Replace the placeholders with your API key and base URL
api_key <- "YOUR_API_KEY"
base_url <- "https://your_canvas_domain.com"
base_url <- "https://your_canvas_domain.com/"

# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate(api_key, base_url)

## Alternatively, you can set system variables

# Set the API key and base URL as environment variables
Sys.setenv(CANVAS_API_KEY = "YOUR_API_KEY")
Sys.setenv(CANVAS_BASE_URL = "https://your_canvas_domain.com/")

# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate()

```

With the authentication step completed, you can now utilize the various functions provided by the `vvcanvas` package to interact with the Canvas LMS.
Expand Down
12 changes: 11 additions & 1 deletion vignettes/getting_started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,21 @@ To start using the package, you need to authenticate with the Canvas LMS API usi
```{r authenticate}
# Replace the placeholders with your API key and base URL
api_key <- "YOUR_API_KEY"
base_url <- "https://your_canvas_domain.com"
base_url <- "https://your_canvas_domain.com/"
# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate(api_key, base_url)
## Alternatively, you can set system variables
# Set the API key and base URL as environment variables
Sys.setenv(CANVAS_API_KEY = "YOUR_API_KEY")
Sys.setenv(CANVAS_BASE_URL = "https://your_canvas_domain.com/")
# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate()
```


Expand Down

0 comments on commit 4f91f54

Please sign in to comment.