classes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 9 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

Overview

Package classes reads the public USC Schedule of Classes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client reads the public USC Schedule of Classes API.

func New

func New() *Client

New returns a public Schedule of Classes client.

func (*Client) Course

func (c *Client) Course(ctx context.Context, termCode, courseCode string) (Course, error)

Course returns courseCode and all of its sections in termCode.

type Course

type Course struct {
	Code           string    `json:"code"`
	Title          string    `json:"title"`
	Description    string    `json:"description"`
	TermCode       int       `json:"term_code"`
	Units          []float64 `json:"units"`
	RemainingSeats int       `json:"remaining_seats"`
	SeatCount      int       `json:"seat_count"`
	Sections       []Section `json:"sections"`
}

Course is a course and all of its scheduled sections for one term.

type Instructor

type Instructor struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

Instructor is a section instructor.

type Meeting

type Meeting struct {
	DayCode   string   `json:"day_code"`
	Days      []string `json:"days"`
	StartTime string   `json:"start_time"`
	EndTime   string   `json:"end_time"`
}

Meeting is one recurring meeting time for a section.

type Section

type Section struct {
	ID              string       `json:"id"`
	Type            string       `json:"type"`
	Cancelled       bool         `json:"cancelled"`
	DClearance      bool         `json:"d_clearance"`
	TotalSeats      int          `json:"total_seats"`
	RegisteredSeats int          `json:"registered_seats"`
	WaitlistedSeats *int         `json:"waitlisted_seats"`
	OpenSeats       int          `json:"open_seats"`
	Full            bool         `json:"full"`
	Units           []string     `json:"units"`
	Schedule        []Meeting    `json:"schedule"`
	Instructors     []Instructor `json:"instructors"`
	Syllabus        string       `json:"syllabus"`
}

Section is one scheduled lecture, lab, quiz, or other class section.

Jump to

Keyboard shortcuts

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