course

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brief

type Brief struct {
	ClazzId  string
	CourseId string
	CoverURL string
	Title    string
	// Duration 意义不大,不同老师填的不同,不推荐使用
	Duration    string
	TeacherName string
	// CourseNum 可能是上课地点可能是课程号,感觉全看教师自己填了什么,不推荐使用
	CourseNum string
	// contains filtered or unexported fields
}

func (*Brief) Detail

func (br *Brief) Detail() (*Course, error)

Detail returns detailed Course for further request

type Course

type Course struct {
	ClazzId     string
	CourseId    string
	CoverURL    string
	Title       string
	Duration    string
	TeacherName string
	CourseNum   string
	// contains filtered or unexported fields
}

func NewCourse

func NewCourse(resp []byte, cb *Brief) (*Course, error)

func (*Course) ChapterList

func (c *Course) ChapterList() (*chapter.List, error)

func (*Course) ExamList

func (c *Course) ExamList() (*exam.List, error)

func (*Course) WorkList

func (c *Course) WorkList() (*work.List, error)

type List

type List struct {
	Courses []Brief
}

func NewCourseList

func NewCourseList(resp []byte, req *request.Request) (*List, error)

func (*List) Each

func (l *List) Each(f func(course *Brief) bool)

func (*List) FindByName

func (l *List) FindByName(name string) *Brief

todo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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