Documentation
¶
Index ¶
- type CancelCourseReq
- type CasLoginReq
- type Client
- func (c *Client) CancelCourse(req *CancelCourseReq) (string, error)
- func (c *Client) CasLoginNewjw() (string, error)
- func (c *Client) CasLoginPost(req *CasLoginReq) (string, error)
- func (c *Client) Get(url string, headers map[string]string) ([]byte, int, error)
- func (c *Client) GetCasLoginConfig() (execution string, croypto string, err error)
- func (c *Client) GetClientBodyConfig() error
- func (c *Client) GetCourse(req *GetCourseReq) (*GetCourseResp, *GetCourseToExcelResp, error)
- func (c *Client) GetCsrftoken() (string, error)
- func (c *Client) GetDoJxbId(req *GetDoJxbIdReq) ([]GetDoJxbIdResp, error)
- func (c *Client) GetPublicKey() (*GetPublicKeyResp, error)
- func (c *Client) GetQrCode(id string) ([]byte, error)
- func (c *Client) GetQrLoginId() (*QrLoginIdResp, error)
- func (c *Client) GetQrLoginStatus(id string) (*QrLoginStatusResp, error)
- func (c *Client) GetReleases() (*GetReleasesResp, error)
- func (c *Client) GetStuInfo() error
- func (c *Client) GetZyhIdByBh(id string) (string, error)
- func (c *Client) LoadCookies(cfg *config.Config) error
- func (c *Client) NewjwLoginPost(req *LoginReq) (string, error)
- func (c *Client) Post(url string, formData string, headers map[string]string) ([]byte, int, error)
- func (c *Client) SaveCookies(cfg *config.Config) error
- func (c *Client) SearchCourse(req *SearchCourseReq) (*SearchCourseResp, error)
- func (c *Client) SelectCourse(req *SelectCourseReq) (*SelectCourseResq, error)
- type ClientBodyConfig
- type GetCourseReq
- type GetCourseResp
- type GetCourseToExcelResp
- type GetDoJxbIdReq
- type GetDoJxbIdResp
- type GetPublicKeyResp
- type GetReleasesResp
- type GetStuInfoResp
- type GetZyhIdByBhResp
- type LoginReq
- type QrLoginIdResp
- type QrLoginStatusResp
- type SearchCourseReq
- type SearchCourseResp
- type SelectCourseReq
- type SelectCourseResq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelCourseReq ¶
CancelCourseReq 退课请求
func (*CancelCourseReq) ToFormData ¶
func (req *CancelCourseReq) ToFormData() url.Values
ToFormData 转换为表单数据
type CasLoginReq ¶
type CasLoginReq struct {
Username string
Type string
EventID string
Geolocation string
Execution string
CaptchaCode string
Croypto string
Password string
}
CasLoginReq cas登录请求
type Client ¶
type Client struct {
ClientBodyConfig *ClientBodyConfig
NjdmIDXs string
ZyhIDXs string
// contains filtered or unexported fields
}
Client 客户端结构体
func (*Client) CancelCourse ¶
func (c *Client) CancelCourse(req *CancelCourseReq) (string, error)
CancelCourse 退课
func (*Client) CasLoginNewjw ¶
CasLoginNewjw cas登录newjw
func (*Client) CasLoginPost ¶
func (c *Client) CasLoginPost(req *CasLoginReq) (string, error)
CasLoginPost cas登录请求
func (*Client) GetCasLoginConfig ¶
GetCasLoginConfig 获取cas登录配置
func (*Client) GetClientBodyConfig ¶
GetClientBodyConfig 获取选课配置
func (*Client) GetCourse ¶
func (c *Client) GetCourse(req *GetCourseReq) (*GetCourseResp, *GetCourseToExcelResp, error)
GetCourse 获取课程
func (*Client) GetCsrftoken ¶
GetCsrftoken 获取csrftoken
func (*Client) GetDoJxbId ¶
func (c *Client) GetDoJxbId(req *GetDoJxbIdReq) ([]GetDoJxbIdResp, error)
GetDoJxbId 获取do_jxb_id
func (*Client) GetPublicKey ¶
func (c *Client) GetPublicKey() (*GetPublicKeyResp, error)
GetPublicKey 获取公钥
func (*Client) GetQrLoginId ¶ added in v1.3.1
func (c *Client) GetQrLoginId() (*QrLoginIdResp, error)
GetQrLoginId 获取二维码登录ID
func (*Client) GetQrLoginStatus ¶ added in v1.3.1
func (c *Client) GetQrLoginStatus(id string) (*QrLoginStatusResp, error)
GetQrLoginStatus 获取二维码登录状态
func (*Client) GetReleases ¶ added in v1.4.2
func (c *Client) GetReleases() (*GetReleasesResp, error)
GetReleases 获取仓库最新版本
func (*Client) GetStuInfo ¶ added in v1.4.4
func (*Client) GetZyhIdByBh ¶ added in v1.4.4
func (*Client) LoadCookies ¶ added in v1.2.0
LoadCookies 加载cookies
func (*Client) NewjwLoginPost ¶
NewjwLoginPost Newjw登录请求
func (*Client) SaveCookies ¶ added in v1.2.0
SaveCookies 保存cookies
func (*Client) SearchCourse ¶ added in v1.3.0
func (c *Client) SearchCourse(req *SearchCourseReq) (*SearchCourseResp, error)
SearchCourse 搜索课程
func (*Client) SelectCourse ¶
func (c *Client) SelectCourse(req *SelectCourseReq) (*SelectCourseResq, error)
SelectCourse 选课
type ClientBodyConfig ¶
type GetCourseReq ¶
type GetCourseReq struct {
Kkbm string
Kch string
Kcfzr string
Xsxy string
ZyhID string
BhID string
ZyfxID string
NjdmID string
Xsdm string
Jxdd string
Kklxdm string
XqhID string
Xkbj string
Kkzt string
Kclbdm string
Kcgsdm string
Kcxzdm string
Apksfsdm string
Ksfsdm string
Khfsdm string
Cxfs string
Jsssbm string
Zcm string
Xbdm string
CdlbID string
CdejlbID string
Jxbmc string
Sfzjxb string
Sfhbbj string
Zymc string
Xnmc string
Xqmc string
Kkxymc string
Jgmc string
Njmc string
Sfpk string
Sfwp string
Ywtk string
Skfs string
Dylx string
Jzglbm string
Jxms string
Skpt string
Sfhxkc string
Sfxwkc string
Sknr string
Bz string
Xkbz string
Sfzj string
Qsz string
ZykfkcbjCx string
SfgssxbkCx string
Zzz string
Xf string
JysID string
Xnm string
Xqm string
Js string
Kclxdm string
Search string
Nd string
ShowCount string
CurrentPage string
QsortName string
SortOrder string
Time string
}
GetCourseReq 获取课程请求
func (*GetCourseReq) ToFormData ¶
func (req *GetCourseReq) ToFormData() url.Values
ToFormData 转换为表单数据
type GetCourseResp ¶
type GetCourseToExcelResp ¶ added in v1.4.3
type GetCourseToExcelResp struct {
Items []struct {
Jxbmc string `json:"jxbmc"` // 教学班名称
KchID string `json:"kch_id"` // 课程号
Kcmc string `json:"kcmc"` // 课程名称
Kkztmc string `json:"kkztmc"` // 是否开课
Bpkbj string `json:"bpkbj"` // 是否排课
Xkbjmc string `json:"xkbjmc"` // 选课标记
Sksj string `json:"sksj"` // 上课时间
Jxdd string `json:"jxdd"` // 上课地点
Cdlbmc string `json:"cdlbmc"` // 场地名称
Cdejlbmc string `json:"cdejlbmc"` // 场地具体名称
Jzgxx string `json:"jzgxx"` // 教职工信息
Jscsrq string `json:"jscsrq"` // 教师出生日期
Jsxb string `json:"jsxb"` // 教师性别
Kkbm string `json:"kkbm"` // 开课部门
Xf string `json:"xf"` // 学分
Zczymc string `json:"zczymc"` // 授课学院
Jxbrl int `json:"jxbrl"` // 教学班容量
Jxbrs int `json:"jxbrs"` // 教学班人数
Xkrs int `json:"xkrs"` // 选课人数
Mxdx string `json:"mxdx"` // 面向对象
Jxbzc string `json:"jxbzc"` // 授课班级
Skdxssxy string `json:"skdxssxy"` // 授课详情
Kklxmc string `json:"kklxmc"` // 开课类型
Kcgsmc string `json:"kcgsmc"` // 课程归属
Kczhxs string `json:"kczhxs"` // 讲课学时
Khfsmc string `json:"khfsmc"` // 考核方式
Xkbz string `json:"xkbz"` // 学科备注
} `json:"items"`
}
type GetDoJxbIdReq ¶
type GetDoJxbIdReq struct {
BklxID string
NjdmID string
Xkxnm string
Xkxqm string
Kklxdm string
KchID string
XkkzID string
Xsbj string
Ccdm string
Xz string
Mzm string
Xslbdm string
Xbm string
BhID string
ZyfxID string
JgID string
XqhID string
NjdmIDXs string
ZyhIDXs string
}
GetDoJxbIdReq 获取do_jxb_id请求
func (*GetDoJxbIdReq) ToFormData ¶
func (req *GetDoJxbIdReq) ToFormData() url.Values
ToFormData 转换为表单数据
type GetDoJxbIdResp ¶
type GetPublicKeyResp ¶
type GetReleasesResp ¶ added in v1.4.2
GetReleasesResp 获取最新版本信息的响应结构体
type GetStuInfoResp ¶ added in v1.4.4
type GetZyhIdByBhResp ¶ added in v1.4.4
type GetZyhIdByBhResp []struct {
ZyhID string `json:"zyh_id"`
}
type QrLoginIdResp ¶ added in v1.3.1
type QrLoginStatusResp ¶ added in v1.3.1
type SearchCourseReq ¶ added in v1.3.0
type SearchCourseReq struct {
Xkxnm string
Xkxqm string
Kklxdm string
Jspage string
Kspage string
Yllist string // 是否有余量
Filterlist string // 搜索内容
NjdmIDXs string
ZyhIDXs string
}
SearchCourseReq 搜索课程请求
func (*SearchCourseReq) ToFormData ¶ added in v1.3.0
func (req *SearchCourseReq) ToFormData() url.Values
ToFormData 转换为表单数据
type SearchCourseResp ¶ added in v1.3.0
type SearchCourseResp struct {
TmpList []struct {
Jxbmc string `json:"jxbmc"`
} `json:"tmpList"`
}
type SelectCourseReq ¶
type SelectCourseReq struct {
JxbIDs string
KchID string
Qz string
NjdmID string
ZyhID string
NjdmIDXs string
ZyhIDXs string
XkkzID string
}
SelectCourseReq 选课请求
func (*SelectCourseReq) ToFormData ¶
func (req *SelectCourseReq) ToFormData() url.Values
ToFormData 转换为表单数据