mirror of
https://github.com/Xevion/banner.git
synced 2025-12-10 14:06:37 -06:00
Add comments to various SearchResult attributes, add SectionAttributes, fix Faculty
This commit is contained in:
26
types.go
26
types.go
@@ -91,6 +91,7 @@ func (m *MeetingTimeResponse) TimeString() string {
|
|||||||
return fmt.Sprintf("%s %s-%s", WeekdaysToString(m.Days()), m.StartTime().String(), m.EndTime().String())
|
return fmt.Sprintf("%s %s-%s", WeekdaysToString(m.Days()), m.StartTime().String(), m.EndTime().String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlaceString returns a formatted string best representing the place of the meeting time
|
||||||
func (m *MeetingTimeResponse) PlaceString() string {
|
func (m *MeetingTimeResponse) PlaceString() string {
|
||||||
if m.MeetingTime.Room == "" {
|
if m.MeetingTime.Room == "" {
|
||||||
return "???"
|
return "???"
|
||||||
@@ -177,23 +178,37 @@ type SearchResult struct {
|
|||||||
Display string `json:"display"`
|
Display string `json:"display"`
|
||||||
} `json:"searchResultsConfig"`
|
} `json:"searchResultsConfig"`
|
||||||
Data []struct {
|
Data []struct {
|
||||||
|
// A internal identifier not used outside of the Banner system
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
|
// The internal identifier for the term this class is in (e.g. 202420)
|
||||||
Term string `json:"term"`
|
Term string `json:"term"`
|
||||||
|
// The human-readable name of the term this class is in (e.g. Fall 2021)
|
||||||
TermDesc string `json:"termDesc"`
|
TermDesc string `json:"termDesc"`
|
||||||
|
// The specific identifier that describes this individual course. CRNs are unique to a term. (TODO: Verify this is true)
|
||||||
CourseReferenceNumber string `json:"courseReferenceNumber"`
|
CourseReferenceNumber string `json:"courseReferenceNumber"`
|
||||||
PartOfTerm string `json:"partOfTerm"`
|
PartOfTerm string `json:"partOfTerm"`
|
||||||
CourseNumber string `json:"courseNumber"`
|
CourseNumber string `json:"courseNumber"`
|
||||||
|
// The short acronym of the course subject (e.g. CS, AEPI)
|
||||||
Subject string `json:"subject"`
|
Subject string `json:"subject"`
|
||||||
|
// The full name of the course subject (e.g. Computer Science, Academic English Program-Intl.)
|
||||||
SubjectDescription string `json:"subjectDescription"`
|
SubjectDescription string `json:"subjectDescription"`
|
||||||
|
// The specific section of the course (e.g. 001, 002)
|
||||||
SequenceNumber string `json:"sequenceNumber"`
|
SequenceNumber string `json:"sequenceNumber"`
|
||||||
|
// The long name of the campus this course takes place at (e.g. Main Campus, Downtown Campus)
|
||||||
CampusDescription string `json:"campusDescription"`
|
CampusDescription string `json:"campusDescription"`
|
||||||
ScheduleTypeDescription string `json:"scheduleTypeDescription"`
|
ScheduleTypeDescription string `json:"scheduleTypeDescription"`
|
||||||
|
// The long name of the course (generally)
|
||||||
CourseTitle string `json:"courseTitle"`
|
CourseTitle string `json:"courseTitle"`
|
||||||
CreditHours int `json:"creditHours"`
|
CreditHours int `json:"creditHours"`
|
||||||
|
// The maximum number of students that can enroll in this course
|
||||||
MaximumEnrollment int `json:"maximumEnrollment"`
|
MaximumEnrollment int `json:"maximumEnrollment"`
|
||||||
|
// The number of students currently enrolled in this course
|
||||||
Enrollment int `json:"enrollment"`
|
Enrollment int `json:"enrollment"`
|
||||||
|
// The number of seats available in this course (MaximumEnrollment - Enrollment)
|
||||||
SeatsAvailable int `json:"seatsAvailable"`
|
SeatsAvailable int `json:"seatsAvailable"`
|
||||||
|
// The number of students that could waitlist for this course
|
||||||
WaitCapacity int `json:"waitCapacity"`
|
WaitCapacity int `json:"waitCapacity"`
|
||||||
|
// The number of students currently on the waitlist for this course
|
||||||
WaitCount int `json:"waitCount"`
|
WaitCount int `json:"waitCount"`
|
||||||
CrossList *string `json:"crossList"`
|
CrossList *string `json:"crossList"`
|
||||||
CrossListCapacity *int `json:"crossListCapacity"`
|
CrossListCapacity *int `json:"crossListCapacity"`
|
||||||
@@ -205,11 +220,20 @@ type SearchResult struct {
|
|||||||
OpenSection bool `json:"openSection"`
|
OpenSection bool `json:"openSection"`
|
||||||
LinkIdentifier *string `json:"linkIdentifier"`
|
LinkIdentifier *string `json:"linkIdentifier"`
|
||||||
IsSectionLinked bool `json:"isSectionLinked"`
|
IsSectionLinked bool `json:"isSectionLinked"`
|
||||||
|
// A combination of the subject and course number (e.g. subject=CS, courseNumber=3443 => "CS3443")
|
||||||
SubjectCourse string `json:"subjectCourse"`
|
SubjectCourse string `json:"subjectCourse"`
|
||||||
ReservedSeatSummary *string `json:"reservedSeatSummary"`
|
ReservedSeatSummary *string `json:"reservedSeatSummary"`
|
||||||
InstructionalMethod string `json:"instructionalMethod"`
|
InstructionalMethod string `json:"instructionalMethod"`
|
||||||
InstructionalMethodDescription string `json:"instructionalMethodDescription"`
|
InstructionalMethodDescription string `json:"instructionalMethodDescription"`
|
||||||
Faculty []FacultyItem
|
SectionAttributes []struct {
|
||||||
|
Class string `json:"class"`
|
||||||
|
Code string `json:"code"`
|
||||||
|
CourseReferenceNumber string `json:"courseReferenceNumber"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
IsZtcAttribute bool `json:"isZTCAttribute"`
|
||||||
|
TermCode string `json:"termCode"`
|
||||||
|
} `json:"sectionAttributes"`
|
||||||
|
Faculty []FacultyItem `json:"faculty"`
|
||||||
MeetingsFaculty []MeetingTimeResponse `json:"meetingsFaculty"`
|
MeetingsFaculty []MeetingTimeResponse `json:"meetingsFaculty"`
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user