Use mow.cli instead of flag
and some minor changes I dont wanna seperate with git add -p
This commit is contained in:
14
noten.go
14
noten.go
@@ -20,6 +20,8 @@ type Note struct {
|
||||
Versuch string
|
||||
}
|
||||
|
||||
type Noten []*Note
|
||||
|
||||
func (n *Note) String() string {
|
||||
var status string
|
||||
switch n.Status {
|
||||
@@ -28,8 +30,6 @@ func (n *Note) String() string {
|
||||
case "bestanden":
|
||||
status = "✔ "
|
||||
case "nicht bestanden":
|
||||
// Not sure if thats the correct value.
|
||||
// Can't test it. Never failed an exam :P
|
||||
status = "✖ "
|
||||
default:
|
||||
status = "❓"
|
||||
@@ -37,9 +37,15 @@ func (n *Note) String() string {
|
||||
return fmt.Sprintf("%s%s %s", status, n.Note, n.Name)
|
||||
}
|
||||
|
||||
func (nn Noten) Print() {
|
||||
for _, n := range nn {
|
||||
fmt.Println(n)
|
||||
}
|
||||
}
|
||||
|
||||
// Noten returns a list of the grades of all graded or signed up modules
|
||||
func (s *Session) Noten() ([]*Note, error) {
|
||||
var noten []*Note
|
||||
func (s *Session) Noten() (Noten, error) {
|
||||
var noten Noten
|
||||
client := &http.Client{}
|
||||
url := "https://lsf.hs-worms.de/qisserver/rds?state=notenspiegelStudent&next=list.vm&nextdir=qispos/notenspiegel/student&createInfos=Y&struct=auswahlBaum&nodeID=auswahlBaum%7Cabschluss%3Aabschl%3D05%2Cstgnr%3D1%7Cstudiengang%3Astg%3D938%2Cpversion%3D2018&expand=0&asi=" + s.ASI
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
|
||||
Reference in New Issue
Block a user