siaklib

package
v0.0.0-...-f5337c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAcademicHistoryPage

func ParseAcademicHistoryPage(r io.Reader) (*[]SemesterScore, error)

Types

type AcademicTerm

type AcademicTerm struct {
	Period string    `json:"period"`
	Term   string    `json:"term"`
	Data   *TermData `json:"data"`
}

type Course

type Course struct {
	Code      string   `json:"code,omitempty"`
	Name      string   `json:"name,omitempty"`
	ClassName string   `json:"class_name,omitempty"`
	Credits   int      `json:"credits,omitempty"`
	Period    string   `json:"period,omitempty"`
	Schedule  []string `json:"schedule,omitempty"`
	Rooms     []string `json:"rooms,omitempty"`
	Lecturers []string `json:"lecturers,omitempty"`
}

func ParseCourseClasses

func ParseCourseClasses(r io.Reader) ([]Course, error)

type CourseComponent

type CourseComponent struct {
	Name   string `json:"name,omitempty"`
	Weight string `json:"weight,omitempty"`
	Score  string `json:"score,omitempty"` // May be "Kosong", so lets just make it string lol
}

func ParseCourseDetail

func ParseCourseDetail(r io.Reader) ([]CourseComponent, error)

type Homepage

type Homepage struct {
	User UserOverview `json:"user"`
	News []News       `json:"news"`
}

func ParseWelcomePage

func ParseWelcomePage(r io.Reader) (*Homepage, error)

type News

type News struct {
	Title   string `json:"title"`
	Content string `json:"content"`
}

type SemesterScore

type SemesterScore struct {
	Period   string         `json:"period"`
	Semester int            `json:"semester"`
	Scores   []SubjectScore `json:"scores"`
}

type StudentAcademic

type StudentAcademic struct {
	NPM           string  `json:"npm"`
	Name          string  `json:"name"`
	Year          int     `json:"year"`
	Major         string  `json:"major"`
	Tutor         string  `json:"tutor"`
	Status        string  `json:"status"`
	CreditsPassed int     `json:"credits_passed"`
	GradePoints   float64 `json:"grade_points"`
	GPA           float64 `json:"gpa"`
	CreditsEarned int     `json:"credits_earned"`
}

type StudentSummary

type StudentSummary struct {
	Student        StudentAcademic `json:"student"`
	ScoresOverview map[string]int  `json:"scores_overview"`
	Terms          []AcademicTerm  `json:"terms"`
}

func ParseAcademicSummaryPage

func ParseAcademicSummaryPage(r io.Reader) (*StudentSummary, error)

type SubjectScore

type SubjectScore struct {
	Code       string `json:"code"`
	Curriculum string `json:"curriculum"`
	Name       string `json:"name"`
	Class      string `json:"class"`
	Credits    int    `json:"credits"`
	Status     string `json:"status"`
	FinalScore string `json:"final_score"`
	FinalIndex string `json:"final_index"`
	ClassId    string `json:"class_id"`
}

type TermData

type TermData struct {
	SubjectsTaken     int     `json:"subjects_taken"`
	CreditsTaken      int     `json:"credits_taken"`
	CreditsPassed     int     `json:"credits_passed"`
	GradePoint        float64 `json:"grade_point"`
	GradePointAverage float64 `json:"grade_point_average"`

	TotalCreditsTaken            int     `json:"total_credits_taken"`
	TotalCreditsPassed           int     `json:"total_credits_passed"`
	TotalCreditsEarned           int     `json:"total_credits_earned"`
	TotalGradePoint              float64 `json:"total_grade_point"`
	TotalGradePointAverage       float64 `json:"total_grade_point_average"`
	TotalPassedGradePointAverage float64 `json:"total_passed_grade_point_average"`
}

type UserInfo

type UserInfo struct {
	Name  string `json:"name,omitempty"`
	Role  string `json:"role,omitempty"`
	Group string `json:"group,omitempty"`
}

func ParseNav

func ParseNav(r io.Reader) (*UserInfo, error)

type UserOverview

type UserOverview struct {
	Username string `json:"username"`
	Identity string `json:"identity"`
	Role     string `json:"role"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL