cqie

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CqieLoginAction

func CqieLoginAction(cache *cqieApi.CqieUserCache) error

CqieLoginAction 登录API聚合整理 {"refresh_code":1,"status":false,"msg":"账号密码不正确"} {"_code": 1, "status": false,"msg": "账号登录超时,请重新登录", "result": {}}

func CqieLoginTokenAction

func CqieLoginTokenAction(cache *cqieApi.CqieUserCache, token string) error

直接用token登录,方便测试用

func SaveVideoStudyTimeAction

func SaveVideoStudyTimeAction(cache *cqieApi.CqieUserCache, video *CqieVideo, startPos, stopPos int) error

保存视屏学习时间点,学习完一个视屏就保存一次

func StartStudyVideoAction

func StartStudyVideoAction(cache *cqieApi.CqieUserCache, video *CqieVideo) error

学习视屏前一定要先调用这个函数才能开始学习

func SubmitStudyTimeAction

func SubmitStudyTimeAction(cache *cqieApi.CqieUserCache, video *CqieVideo, studyTime time.Time, startPos int, stopPos int, maxPos int) error

提交学时

Types

type CqieCourse

type CqieCourse struct {
	Id              string    //这个是课程的id也就是courseId
	CourseName      string    //课程名称
	StudentCourseId string    //对应学生课程ID
	SumUnit         int       //一共多少单元
	HaveUnit        int       //以学单元
	SumTime         time.Time //总时长
	HaveTime        time.Time //以学时长
	Learned         string    //已学进度
	CoursewareId    string    //某个和课程相关的ID
}

func CqiePullCourseListAction

func CqiePullCourseListAction(cache *cqieApi.CqieUserCache) ([]CqieCourse, error)

CqiePullCourseListAction 拉取课程列表信息

type CqieVideo

type CqieVideo struct {
	VideoId         string //视屏Id
	CourseId        string //课程Id
	UnitId          string //单元Id
	VideoName       string //视屏名称
	TimeLength      int    //视屏时长
	StudentCourseId string //学时课程ID
	CoursewareId    string //某个和课程相关的ID
	StudyId         string //学习视屏临时生成的ID
	MaxCurrentPos   int    //当前观看进度
	StudyTime       int    //以及学习到的时间点
}

func PullCourseVideoListAction

func PullCourseVideoListAction(cache *cqieApi.CqieUserCache, course *CqieCourse) ([]CqieVideo, error)

拉取对应课程的所有视屏

func PullCourseVideoListAndProgress

func PullCourseVideoListAndProgress(cache *cqieApi.CqieUserCache, course *CqieCourse) ([]CqieVideo, error)

Jump to

Keyboard shortcuts

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