webreg

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: 14 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 BinState

type BinState struct {
	Scheduled  bool `json:"scheduled"`
	Registered bool `json:"registered"`
}

type CalendarEvent

type CalendarEvent struct {
	ID        string    `json:"id"`
	Title     string    `json:"title"`
	SectionID string    `json:"section_id,omitempty"`
	Status    string    `json:"status"`
	Start     time.Time `json:"start"`
	End       time.Time `json:"end"`
}

type Checkout

type Checkout struct {
	Term    string          `json:"term"`
	Ready   bool            `json:"ready"`
	Message string          `json:"message,omitempty"`
	Groups  []CheckoutGroup `json:"groups"`
}

type CheckoutGroup

type CheckoutGroup struct {
	Action  string   `json:"action"`
	Heading string   `json:"heading"`
	Courses []Course `json:"courses"`
}

type CheckoutResult

type CheckoutResult struct {
	Term      string   `json:"term"`
	Succeeded bool     `json:"succeeded"`
	Status    string   `json:"status"`
	Messages  []string `json:"messages,omitempty"`
}

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) Add

func (c *Client) Add(ctx context.Context, term string, sectionID int) error

func (*Client) Calendar

func (c *Client) Calendar(ctx context.Context, term string) ([]CalendarEvent, error)

func (*Client) Checkout

func (c *Client) Checkout(ctx context.Context, term string) (*Checkout, error)

func (*Client) CourseBin

func (c *Client) CourseBin(ctx context.Context, term string) (*CourseBin, error)

func (*Client) Courses

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

func (*Client) Programs

func (c *Client) Programs(ctx context.Context, term string) ([]School, error)

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, term string, sectionID int) error

func (*Client) Schedule

func (c *Client) Schedule(ctx context.Context, term string, sectionID int) error

func (*Client) SelectTerm

func (c *Client) SelectTerm(ctx context.Context, term string) error

func (*Client) SetGradeOption

func (c *Client) SetGradeOption(ctx context.Context, term string, sectionID int, code string) (string, error)

func (*Client) Submit

func (c *Client) Submit(ctx context.Context, term string) (*CheckoutResult, error)

func (*Client) Terms

func (c *Client) Terms(ctx context.Context) ([]Term, error)

func (*Client) Unschedule

func (c *Client) Unschedule(ctx context.Context, term string, sectionID int) error

type Course

type Course struct {
	Code          string    `json:"code"`
	Title         string    `json:"title"`
	Description   string    `json:"description,omitempty"`
	Prerequisites []string  `json:"prerequisites,omitempty"`
	Sections      []Section `json:"sections"`
}

type CourseBin

type CourseBin struct {
	Term               string   `json:"term"`
	RegisteredSections int      `json:"registered_sections"`
	ScheduledSections  int      `json:"scheduled_sections"`
	AsOf               string   `json:"as_of,omitempty"`
	Courses            []Course `json:"courses"`
}

func (*CourseBin) Section

func (b *CourseBin) Section(id int) (*Section, error)

type CourseQuery

type CourseQuery struct {
	Program string
	Course  string
}

type Doer

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

type Error

type Error struct {
	Operation string
	Status    int
	Message   string
}

func (*Error) Error

func (e *Error) Error() string

type GradeChoice

type GradeChoice struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type GradeOption

type GradeOption struct {
	Current       string        `json:"current,omitempty"`
	Choices       []GradeChoice `json:"choices,omitempty"`
	ChangeRequest bool          `json:"change_request"`
	// contains filtered or unexported fields
}

type Program

type Program struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type School

type School struct {
	Name     string    `json:"name"`
	Programs []Program `json:"programs"`
}

type Seats

type Seats struct {
	Registered int    `json:"registered"`
	Capacity   int    `json:"capacity"`
	Closed     bool   `json:"closed"`
	Text       string `json:"text"`
}

type Section

type Section struct {
	ID int `json:"id"`

	Clearance   string       `json:"clearance,omitempty"`
	Session     string       `json:"session,omitempty"`
	Type        string       `json:"type,omitempty"`
	Units       string       `json:"units,omitempty"`
	Seats       Seats        `json:"seats"`
	Times       []string     `json:"times,omitempty"`
	Days        []string     `json:"days,omitempty"`
	Instructors []string     `json:"instructors,omitempty"`
	Locations   []string     `json:"locations,omitempty"`
	Notes       []string     `json:"notes,omitempty"`
	InCourseBin *bool        `json:"in_course_bin,omitempty"`
	CourseBin   *BinState    `json:"course_bin,omitempty"`
	GradeOption *GradeOption `json:"grade_option,omitempty"`
}

type Term

type Term struct {
	Code   string `json:"code"`
	Name   string `json:"name"`
	Active bool   `json:"active"`
}

Jump to

Keyboard shortcuts

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