xuexitong

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiLoginWeb = "https://passport2.chaoxing.com/fanyalogin"

	ApiPullCourses = "https://mooc1-api.chaoxing.com/mycourse/backclazzdata"

	// ApiChapterPoint 接口-课程章节任务点状态
	ApiChapterPoint = "https://mooc1-api.chaoxing.com/job/myjobsnodesmap"
	ApiChapterCards = "https://mooc1-api.chaoxing.com/gas/knowledge"
	ApiPullChapter  = "https://mooc1-api.chaoxing.com/gas/clazz"

	// PageMobileChapterCard SSR页面-客户端章节任务卡片
	PageMobileChapterCard = "https://mooc1-api.chaoxing.com/knowledge/cards"

	// APIChapterCardResource 接口-课程章节卡片资源
	APIChapterCardResource = "https://mooc1-api.chaoxing.com/ananas/status"
	// APIVideoPlayReport 接口-视频播放上报
	APIVideoPlayReport = "https://mooc1.chaoxing.com/mooc-ans/multimedia/log/a"

	// ApiWorkCommit 接口-单元作业答题提交
	ApiWorkCommit = "https://mooc1-api.chaoxing.com/work/addStudentWorkNew"

	// 接口-课程文档阅读上报
	ApiDocumentReadingReport = "https://mooc1.chaoxing.com/ananas/job/document"

	// PageMobileWork SSR页面-客户端单元测验答题页
	PageMobileWork  = "https://mooc1-api.chaoxing.com/android/mworkspecial"           // 这是个cxkitty中的
	PageMobileWorkY = "https://mooc1-api.chaoxing.com/mooc-ans/work/phone/doHomeWork" // 这个是自己爬的

	KEY = "u2oh6Vu^HWe4_AES" // 注意 Go 语言中字符串默认就是 UTF-8 编码
)

注意Api类文件主需要写最原始的接口请求和最后的json的string形式返回,不需要用结构体序列化。 序列化和具体的功能实现请移步到Action代码文件中

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message string
}

func (*APIError) Error

func (e *APIError) Error() string

type XueXiTUserCache

type XueXiTUserCache struct {
	Name     string //用户使用Phone
	Password string //用户密码

	UserID      string // 用户ID
	JsonContent map[string]interface{}
	// contains filtered or unexported fields
}

func (*XueXiTUserCache) CourseListApi

func (cache *XueXiTUserCache) CourseListApi() (string, error)

CourseListApi 拉取对应账号的课程数据

func (*XueXiTUserCache) DocumentDtoReadingReport added in v1.2.0

func (cache *XueXiTUserCache) DocumentDtoReadingReport(p *entity.PointDocumentDto) (string, error)

func (*XueXiTUserCache) FetchChapterCords

func (cache *XueXiTUserCache) FetchChapterCords(nodes []int, index, courseId int) (string, error)

FetchChapterCords 以课程序号拉取对应“章节”的任务节点卡片资源 Args:

nodes: 任务点集合 , index: 任务点索引

func (*XueXiTUserCache) FetchChapterPointStatus

func (cache *XueXiTUserCache) FetchChapterPointStatus(nodes []int, clazzID, userID, cpi, courseID int) (string, error)

FetchChapterPointStatus 章节状态 nodes 各章节对应ID

func (*XueXiTUserCache) GetCookie

func (cache *XueXiTUserCache) GetCookie() string

func (*XueXiTUserCache) GetCourseFaceQrPlan1Api added in v1.2.0

func (cache *XueXiTUserCache) GetCourseFaceQrPlan1Api(courseId, classId, uuid, objectId, qrcEnc, failCount string) (string, error)

过人脸(第一版)

func (*XueXiTUserCache) GetCourseFaceQrPlan2Api added in v1.2.0

func (cache *XueXiTUserCache) GetCourseFaceQrPlan2Api(classId, courseId, uuid, objectId, qrcEnc, failCount string) (string, error)

过人脸(第二版)

func (*XueXiTUserCache) GetCourseFaceQrStateApi added in v1.2.0

func (cache *XueXiTUserCache) GetCourseFaceQrStateApi() (string, error)

获取人脸状态(二维码状态)

func (*XueXiTUserCache) GetFaceQrCodeApi added in v1.2.0

func (cache *XueXiTUserCache) GetFaceQrCodeApi(courseId, clazzid, chapterId, cpi string) (string, string, error)

获取人脸的必要数据

func (*XueXiTUserCache) LoginApi

func (cache *XueXiTUserCache) LoginApi() (string, error)

LoginApi 登录Api

func (*XueXiTUserCache) PageMobileChapterCard added in v1.0.6

func (cache *XueXiTUserCache) PageMobileChapterCard(
	classId, courseId, knowledgeId, cardIndex, cpi int) (string, error)

PageMobileChapterCard 客户端章节任务卡片 原始html数据返回

func (*XueXiTUserCache) PullChapter

func (cache *XueXiTUserCache) PullChapter(cpi int, key int) (string, error)

PullChapter ??????????cpi ?key ?? ???? cpi ? key ?? ????json?????? int TODO???? int ???????? ?Course???????? ? ?action?????XueXiTCourseDetailForCourseIdAction???? ???

func (*XueXiTUserCache) VerificationCodeApi

func (cache *XueXiTUserCache) VerificationCodeApi() (string, string)

VerificationCodeApi 获取验证码和SESSION验证码,并返回文件路径和SESSION字符串

func (*XueXiTUserCache) VideoDtoFetch added in v1.0.6

func (cache *XueXiTUserCache) VideoDtoFetch(p *entity.PointVideoDto) (string, error)

VideoDtoFetch 视频数据

func (*XueXiTUserCache) VideoDtoPlayReport added in v1.0.7

func (cache *XueXiTUserCache) VideoDtoPlayReport(p *entity.PointVideoDto, playingTime int, isdrag int, retry int, lastErr error) (string, error)

func (*XueXiTUserCache) WorkCommit added in v1.1.2

func (cache *XueXiTUserCache) WorkCommit(p *entity.PointWorkDto, fields []entity.WorkInputField) (string, error)

func (*XueXiTUserCache) WorkFetchQuestion added in v1.0.9

func (cache *XueXiTUserCache) WorkFetchQuestion(p *entity.PointWorkDto) (string, error)

WorkFetchQuestion 获取作业题目

Jump to

Keyboard shortcuts

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