Rename NoCache() to Nonce()

This commit is contained in:
2023-12-12 00:00:38 -06:00
parent ac8a11538b
commit 4cb6b10226
2 changed files with 9 additions and 8 deletions

14
api.go
View File

@@ -15,7 +15,7 @@ var (
)
func init() {
sessionID = RandomString(5) + NoCache()
sessionID = RandomString(5) + Nonce()
log.Printf("Session ID: %s", sessionID)
}
@@ -28,7 +28,7 @@ func GetTerms(search string, offset int, max int) ([]Term, error) {
"searchTerm": search,
"offset": strconv.Itoa(offset),
"max": strconv.Itoa(max),
"_": NoCache(),
"_": Nonce(),
})
onRequest(req)
@@ -62,7 +62,7 @@ func GetPartOfTerms(search string, term int, offset int, max int) ([]TermParts,
"offset": strconv.Itoa(offset),
"max": strconv.Itoa(max),
"uniqueSessionId": sessionID,
"_": NoCache(),
"_": Nonce(),
})
res, err := client.Do(req)
@@ -89,7 +89,7 @@ func GetInstructor(search string, term int, offset int, max int) []Instructor {
"offset": strconv.Itoa(offset),
"max": strconv.Itoa(max),
"uniqueSessionId": sessionID,
"_": NoCache(),
"_": Nonce(),
})
res, err := client.Do(req)
@@ -171,7 +171,7 @@ func GetSubjects(search string, term int, offset int, max int) []Subject {
"offset": strconv.Itoa(offset),
"max": strconv.Itoa(max),
"uniqueSessionId": sessionID,
"_": NoCache(),
"_": Nonce(),
})
res, err := client.Do(req)
@@ -199,7 +199,7 @@ func GetCampuses(search string, term int, offset int, max int) []Campus {
"offset": strconv.Itoa(offset),
"max": strconv.Itoa(max),
"uniqueSessionId": sessionID,
"_": NoCache(),
"_": Nonce(),
})
res, err := client.Do(req)
@@ -227,7 +227,7 @@ func GetInstructionalMethods(search string, term int, offset int, max int) ([]In
"offset": strconv.Itoa(offset),
"max": strconv.Itoa(max),
"uniqueSessionId": sessionID,
"_": NoCache(),
"_": Nonce(),
})
res, err := client.Do(req)