brightspace

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcement

type Announcement struct {
	CourseID         int          `json:"course_id"`
	CourseCode       *string      `json:"course_code"`
	ID               int          `json:"id"`
	Title            string       `json:"title"`
	Body             string       `json:"body"`
	StartDate        *string      `json:"start_date"`
	EndDate          *string      `json:"end_date"`
	CreatedDate      *string      `json:"created_date"`
	LastModifiedDate *string      `json:"last_modified_date"`
	IsPinned         bool         `json:"is_pinned"`
	IsHidden         bool         `json:"is_hidden"`
	Attachments      []Attachment `json:"attachments"`
}

type AnnouncementFeed

type AnnouncementFeed struct {
	Announcements []Announcement `json:"announcements"`
	Errors        []CourseError  `json:"errors,omitempty"`
}

type Assignment

type Assignment struct {
	ID             int      `json:"id"`
	Name           string   `json:"name"`
	DueDate        *string  `json:"due_date"`
	AvailableFrom  *string  `json:"available_from"`
	AvailableUntil *string  `json:"available_until"`
	Points         *float64 `json:"points"`
}

type Attachment

type Attachment struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	Size *int   `json:"size"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(httpClient Doer) *Client

func Open

func Open(ctx context.Context, options auth.Options) (*Client, error)

func (*Client) AllAnnouncements

func (c *Client) AllAnnouncements(ctx context.Context, since string) (AnnouncementFeed, error)

func (*Client) Announcements

func (c *Client) Announcements(ctx context.Context, courseID int, since string) ([]Announcement, error)

func (*Client) Assignments

func (c *Client) Assignments(ctx context.Context, courseID int) ([]Assignment, error)

func (*Client) Content

func (c *Client) Content(ctx context.Context, courseID int) (TableOfContents, error)

func (*Client) Courses

func (c *Client) Courses(ctx context.Context) ([]Course, error)

func (*Client) Download

func (c *Client) Download(ctx context.Context, contentURL string) (io.ReadCloser, error)

func (*Client) DownloadSubmissionFile

func (c *Client) DownloadSubmissionFile(ctx context.Context, courseID, folderID, submissionID, fileID int) (io.ReadCloser, error)

func (*Client) Enrollments

func (c *Client) Enrollments(ctx context.Context) ([]Course, error)

func (*Client) Grades

func (c *Client) Grades(ctx context.Context, courseID int) (Grades, error)

func (*Client) Submissions

func (c *Client) Submissions(ctx context.Context, courseID, folderID int) ([]Submission, error)

func (*Client) Topic

func (c *Client) Topic(ctx context.Context, courseID, topicID int) (Topic, error)

func (*Client) WhoAmI

func (c *Client) WhoAmI(ctx context.Context) (User, error)

type Course

type Course struct {
	ID      int     `json:"id"`
	Code    *string `json:"code"`
	Title   string  `json:"title"`
	Section *string `json:"section"`
	Type    string  `json:"type"`
	Role    string  `json:"role"`
	RawName string  `json:"raw_name"`
}

type CourseError

type CourseError struct {
	CourseID int    `json:"course_id"`
	Error    string `json:"error"`
}

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type Error

type Error struct {
	Label  string
	Status int
	Body   string
}

func (*Error) Error

func (e *Error) Error() string

type Grade

type Grade struct {
	ID               string   `json:"id"`
	Name             string   `json:"name"`
	GradeType        string   `json:"grade_type"`
	MaxPoints        *float64 `json:"max_points"`
	Weight           *float64 `json:"weight"`
	IsBonus          bool     `json:"is_bonus"`
	ExcludeFromFinal bool     `json:"exclude_from_final"`
	Score            *float64 `json:"score"`
	ScoreMax         *float64 `json:"score_max"`
	DisplayedGrade   *string  `json:"displayed_grade"`
	Feedback         *string  `json:"feedback"`
	LastModified     *string  `json:"last_modified"`
}

type Grades

type Grades struct {
	CourseID int     `json:"course_id"`
	Grades   []Grade `json:"grades"`
}

func (Grades) Graded

func (g Grades) Graded() Grades

type Module

type Module struct {
	ID           int      `json:"id"`
	Title        string   `json:"title"`
	Description  *string  `json:"description"`
	LastModified *string  `json:"last_modified"`
	Topics       []Topic  `json:"topics"`
	Modules      []Module `json:"modules"`
}

type Submission

type Submission struct {
	ID          int              `json:"id"`
	SubmittedBy string           `json:"submitted_by"`
	Date        *string          `json:"date"`
	Comment     string           `json:"comment"`
	Files       []SubmissionFile `json:"files"`
}

type SubmissionFile

type SubmissionFile struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	Size int64  `json:"size"`
}

type TableOfContents

type TableOfContents struct {
	CourseID int      `json:"course_id"`
	Modules  []Module `json:"modules"`
}

func (TableOfContents) Flatten

func (t TableOfContents) Flatten() []Topic

type Topic

type Topic struct {
	ID           int     `json:"id"`
	Title        string  `json:"title"`
	Type         int     `json:"type"`
	URL          string  `json:"url"`
	DueDate      *string `json:"due_date"`
	LastModified *string `json:"last_modified"`

	Module string `json:"module,omitempty"`
}

type User

type User struct {
	ID         string `json:"id"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	UniqueName string `json:"unique_name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL