mirror of
https://github.com/Xevion/banner.git
synced 2025-12-06 19:14:23 -06:00
Spelling, separate Course struct from SearchResults
Separating the course struct will be useful for storing classes by CRN later on
This commit is contained in:
@@ -53,6 +53,7 @@ The follow features, JSON, and more require validation & analysis:
|
||||
- AFF vs AIN vs AHB etc.
|
||||
- Do CRNs repeat between years?
|
||||
- Check whether partOfTerm is always filled in, and it's meaning for various class results.
|
||||
- Check which API calls are affected by change in term/sessionID term select
|
||||
|
||||
## Real-time Suggestions
|
||||
|
||||
|
||||
2
api.go
2
api.go
@@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
log "github.com/rs/zerolog/log"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
var sessionID string = RandomString(5) + Nonce()
|
||||
|
||||
2
term.go
2
term.go
@@ -41,7 +41,7 @@ type YearDayRange struct {
|
||||
}
|
||||
|
||||
// GetYearDayRange returns the start and end day of each term for the given year.
|
||||
// This could technichally introduce race conditions, but it's more likely confusion from UTC will be a greater issue.
|
||||
// This could technically introduce race conditions, but it's more likely confusion from UTC will be a greater issue.
|
||||
// Spring: January 14th to May
|
||||
// Summer: May 25th - August 15th
|
||||
// Fall: August 18th - December 10th
|
||||
|
||||
6
types.go
6
types.go
@@ -240,7 +240,10 @@ type SearchResult struct {
|
||||
Config string `json:"config"`
|
||||
Display string `json:"display"`
|
||||
} `json:"searchResultsConfig"`
|
||||
Data []struct {
|
||||
Data []Course `json:"data"`
|
||||
}
|
||||
|
||||
type Course struct {
|
||||
// A internal identifier not used outside of the Banner system
|
||||
Id int `json:"id"`
|
||||
// The internal identifier for the term this class is in (e.g. 202420)
|
||||
@@ -298,5 +301,4 @@ type SearchResult struct {
|
||||
} `json:"sectionAttributes"`
|
||||
Faculty []FacultyItem `json:"faculty"`
|
||||
MeetingsFaculty []MeetingTimeResponse `json:"meetingsFaculty"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user