Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetClientTimeout ¶ added in v0.0.4
SetClientTimeout sets the client timeout
func SetHTTPClient ¶ added in v0.0.4
SetHTTPClient lets callers set the package level http client
func SubjectsOffered ¶ added in v0.0.4
func SubjectsOffered(config ScheduleConfig) (map[string]string, error)
SubjectsOffered will pull down the courses offered for a semester
Types ¶
type Course ¶
type Course struct { CRN int // comprised of the subject code and course number Fullcode string // Course subject code Subject string // course number Number int // Lab or Discussion section. If the object is // a lecture then this should be 01 Section string // Course title Title string Exam *Exam Units int Activity string // TODO this should be changed to "Type CourseType" Days []time.Weekday Time struct { Start, End time.Time } BuildingRoom string Date struct { Start, End time.Time } Instructor string Capacity int Enrolled int // contains filtered or unexported fields }
Course holds data for a specific course that has been parsed from the courses table.
func (*Course) CourseNumber ¶
CourseNumber returns the number used to semantically identify the course
type CourseType ¶ added in v0.0.4
type CourseType string
CourseType is a label for the type of course i.e. lecture, lab, discussion, etc.
const ( Lecture CourseType = "LECT" Lab CourseType = "LAB" Discussion CourseType = "DISC" Seminar CourseType = "SEM" Studio CourseType = "STDO" FiedWork CourseType = "FLDW" Initiative CourseType = "INI" // TODO still not sure what this means, sticking with initiative for now )
These are the only course types
type Exam ¶ added in v0.0.4
type Exam struct { Day time.Weekday Building string Date time.Time Time struct { Start, End time.Time } }
Exam is a course exam
type Schedule ¶
Schedule is a map of courses by course CRN
func NewSchedule ¶
func NewSchedule(config ScheduleConfig) (Schedule, error)
NewSchedule will return a new schedule based on the config.
Click to show internal directories.
Click to hide internal directories.