A go wrapper of the blackboard REST API.
- Go 100%
| .vscode | ||
| endpoints | ||
| .gitignore | ||
| announcement.go | ||
| announcement_api.go | ||
| auth.go | ||
| client.go | ||
| constants.go | ||
| course.go | ||
| course_api.go | ||
| date.go | ||
| date_test.go | ||
| discussion.go | ||
| discussion_api.go | ||
| errors.go | ||
| go.mod | ||
| gradebook.go | ||
| gradebook_api.go | ||
| input.go | ||
| LICENSE | ||
| README.md | ||
| results.go | ||
| system.go | ||
| system_api.go | ||
| user.go | ||
| user_api.go | ||
Chawk
A Go client for the Blackboard REST API designed to make common admin tasks like managing users, enrollments, and course data easier to automate.
Note
This is not a 1-to-1 mapping of the Blackboard API. It started as a collection of functions I kept needing for various internal projects. It only includes the functionality and endpoints I needed, I will add more as the need comes up. While it is stable enough for production, we highly recommend reviewing the source code and thoroughly testing it in your development instance first.
Setup
To start, you will need:
- Request access to the Blackboard REST APIs through the Developer Portal.
- After registering your application, you will receive an application key and secret.
- Your institution's Blackboard URL.
Installing
go get codeberg.org/sugarvoid/chawk
Example of creating a client
clientKey := "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
clientSecret := "xxxxxxxxxxxxxxxxxxxxxxxxx"
baseURL := "https://blackboard.xxxx.edu"
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
// Adding an AppName is optional, but highly encouraged as it prevents conflict with caching bearer tokens.
client, err := chawk.NewClient(clientKey, clientSecret, baseURL, chawk.WithAppName("exampleApp"))
if err != nil {
fmt.Printf("Failed to create BlackboardClient: %v", err)
}
More examples can be found here.