Documentation
¶
Overview ¶
Package btime is a library for the berkeleytime api. See https://www.berkeleytime.com/landing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct { Level Items `json:"level"` Haas Items `json:"haas"` University Items `json:"university"` Engineering Items `json:"engineering"` Department Items `json:"department"` Ls Items `json:"ls"` Semester Items `json:"semester"` Units Items `json:"units"` // TODO: find out what type these should be Time []interface{} `json:"time"` Length []interface{} `json:"length"` Chemistry []interface{} `json:"chemistry"` Enrollment []interface{} `json:"enrollment"` DefaultPlaylists string `json:"default_playlists"` DefaultCourse string `json:"default_course"` // contains filtered or unexported fields }
Catalog is a json struct for a catalog
func (*Catalog) Courses ¶
Courses returns a slice of Results in a generic Course interface format. Returns nil on error.
func (*Catalog) DefaultFilter ¶
DefaultFilter makes a filter request to the catalog's default filter parameters
type Course ¶
type Course struct { Course struct { Units string `json:"units"` Description string `json:"description"` Title string `json:"title"` Prerequisites string `json:"prerequisites"` Abbreviation string `json:"abbreviation"` EnrolledPercentage float64 `json:"enrolled_percentage"` Department string `json:"department"` EnrolledMax int `json:"enrolled_max"` Waitlisted int `json:"waitlisted"` Enrolled int `json:"enrolled"` GradeAverage float64 `json:"grade_average"` CourseNumber string `json:"course_number"` ID int `json:"id"` LetterAverage string `json:"letter_average"` } `json:"course"` Marketplace struct { } `json:"marketplace"` LastEnrollmentUpdate string `json:"last_enrollment_update"` Requirements []string `json:"requirements"` Favorited bool `json:"favorited"` Ongoing bool `json:"ongoing"` CoverPhoto string `json:"cover_photo"` Sections []struct { Kind string `json:"kind"` LocationName string `json:"location_name"` Waitlisted int `json:"waitlisted"` FinalEnd string `json:"final_end"` StartTime string `json:"start_time"` SectionNumber string `json:"section_number"` FinalStart string `json:"final_start"` WordDays string `json:"word_days"` Ccn string `json:"ccn"` EnrolledMax int `json:"enrolled_max"` EndTime string `json:"end_time"` FinalDay string `json:"final_day"` Enrolled int `json:"enrolled"` Instructor string `json:"instructor"` ID int `json:"id"` } `json:"sections"` OngoingSections []struct { Kind string `json:"kind"` LocationName string `json:"location_name"` Waitlisted int `json:"waitlisted"` FinalEnd string `json:"final_end"` StartTime string `json:"start_time"` SectionNumber string `json:"section_number"` FinalStart string `json:"final_start"` WordDays string `json:"word_days"` Ccn string `json:"ccn"` EnrolledMax int `json:"enrolled_max"` EndTime string `json:"end_time"` FinalDay string `json:"final_day"` Enrolled int `json:"enrolled"` Instructor string `json:"instructor"` ID int `json:"id"` } `json:"ongoing_sections"` }
Course is the course info sent back as json.
type Item ¶
type Item struct { Name string `json:"name"` Semester string `json:"semester"` Category string `json:"category"` Year string `json:"year"` ID int `json:"id"` }
Item is an item on the catalog
type Result ¶
type Result struct { Title string `json:"title"` Description string `json:"description"` ResultID int `json:"id"` Units string `json:"units"` OpenSeats int `json:"open_seats"` Abbreviation string `json:"abbreviation"` EnrolledPercentage float64 `json:"enrolled_percentage"` CourseNumber string `json:"course_number"` FavoriteCount int `json:"favorite_count"` Waitlisted int `json:"waitlisted"` Enrolled int `json:"enrolled"` GradeAverage float64 `json:"grade_average"` LetterAverage string `json:"letter_average"` }
Result is the result from the filter endpoint.
Click to show internal directories.
Click to hide internal directories.