learn

package
v0.0.0-...-54ff246 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL = "http://learn.cic.tsinghua.edu.cn"
	AuthURL = "" /* 127-byte string literal not displayed */
)
View Source
const (
	ProfileURL = BaseURL + "/b/m/getStudentById"
)
View Source
const (
	TeachingWeekURL = BaseURL + "/b/myCourse/courseList/getCurrentTeachingWeek"
)

Variables

This section is empty.

Functions

func AnnouncementsURL

func AnnouncementsURL(courseId string) string

func AssignmentsURL

func AssignmentsURL(courseId string) string

func AssistantsURL

func AssistantsURL(courseId string) string

func AttendedURL

func AttendedURL(semesterId string) string

func DownloadURL

func DownloadURL(fileId string) string

func FilesURL

func FilesURL(courseId string) string

func HandlerFunc

func HandlerFunc(f func(http.ResponseWriter, *http.Request, *Adapter)) http.Handler

func SchedulesURL

func SchedulesURL(courseId string) string

Types

type Adapter

type Adapter struct{ util.Client }

func New

func New(userId, password string) (ada *Adapter, status int, errMsg error)

func (*Adapter) AllAttended

func (ada *Adapter) AllAttended(english bool) (courses []*model.Course, status int, errMsg error)

func (*Adapter) Announcements

func (ada *Adapter) Announcements(courseId string) (announcements []*model.Announcement, status int, errMsg error)

func (*Adapter) Assignments

func (ada *Adapter) Assignments(courseId string) (assignments []*model.Assignment, status int, errMsg error)

func (*Adapter) Assistants

func (ada *Adapter) Assistants(courseId string) (assistants []*model.User, status int, errMsg error)

func (*Adapter) Attended

func (ada *Adapter) Attended(semesterId string, english bool) (courses []*model.Course, status int, errMsg error)

func (*Adapter) Files

func (ada *Adapter) Files(courseId string) (files []*model.File, status int, errMsg error)

func (*Adapter) NowAttended

func (ada *Adapter) NowAttended(english bool) (thisCourses []*model.Course, nextCourses []*model.Course, status int, errMsg error)

func (*Adapter) PastAttended

func (ada *Adapter) PastAttended(english bool) (courses []*model.Course, status int, errMsg error)

func (*Adapter) Profile

func (ada *Adapter) Profile() (profile *model.User, status int, errMsg error)

func (*Adapter) Schedules

func (ada *Adapter) Schedules(courseId string) (schedules []*model.Schedule, status int, errMsg error)

func (*Adapter) Semesters

func (ada *Adapter) Semesters() (thisSem, nextSem *model.Semester, status int, errMsg error)

Jump to

Keyboard shortcuts

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