api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(url string, dest string, bar *pb.ProgressBar) error

func Login

func Login(id, pass string, matrixSolver func([3][]string) (rune, rune, rune)) error

func LoginOcwi

func LoginOcwi() error

func LogoutOcwi

func LogoutOcwi() error

Types

type Attachment

type Attachment struct {
	Url   string
	Title string
	Type  string
	Ext   string
	Size  string
	Year  int
	Month int
	Day   int
}

type Class

type Class struct {
	Title             string
	Date              string
	Room              string
	Type              string
	IsRoomChanged     bool
	IsCanceled        bool
	Attachments       []Attachment
	AttachmentComment string
}

type LectureNoteResult

type LectureNoteResult struct {
	SubjectName   string
	SubjectNameEn string
	Id            int
	Classes       []Class
}

func GetLectureNote

func GetLectureNote(id int) (*LectureNoteResult, error)

type Subject

type Subject struct {
	Id               int
	Name             string
	Periods          []string
	Lecturers        []string
	Rooms            []string
	LastUpdated      string
	OpenTaskCount    int
	ExamSchedule     []string
	IsNotesAvailable bool
}

type SubjectListResult

type SubjectListResult struct {
	Terms []Term
}

func GetLectureList

func GetLectureList() (*SubjectListResult, error)

type Term

type Term struct {
	Name     string
	Subjects []Subject
}

Jump to

Keyboard shortcuts

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