Documentation ¶
Index ¶
- Constants
- Variables
- type JwxtClient
- func (c *JwxtClient) CasFirstGet(LoginForm *LoginForm)
- func (c *JwxtClient) CheckLogin() bool
- func (c *JwxtClient) GetCoursePhase() *course.CoursePhase
- func (c *JwxtClient) GetFavicon() []byte
- func (c *JwxtClient) GetStudentImg(id string) []byte
- func (c *JwxtClient) GetTeacherImg(id string) []byte
- func (c *JwxtClient) GetUserInfo() *user
- func (c *JwxtClient) GetYearTerm() string
- func (c *JwxtClient) ListCourse(courseType string, opts ...course.ReqOptionSetter) *course.CourseList
- func (c *JwxtClient) ListCourseWithPage(courseType string, pageNo int, opts ...course.ReqOptionSetter) *course.CourseList
- func (c *JwxtClient) ListMajCompCourse(opts ...course.ReqOptionSetter) *course.CourseList
- func (c *JwxtClient) ListMajElecCourse(opts ...course.ReqOptionSetter) *course.CourseList
- func (c *JwxtClient) ListPubElecCourse(opts ...course.ReqOptionSetter) *course.CourseList
- func (c *JwxtClient) Login() bool
- func (c *JwxtClient) LoginWithCookies() (isLogin bool, err error)
- func (c *JwxtClient) LoginWithForm(LoginForm *LoginForm) bool
- type LoginForm
Constants ¶
View Source
const ( MODE_JWXT int = iota MODE_JWXT443 )
Variables ¶
View Source
var DEFAULT_CAPTCHA_PATH string = "./captcha.jpg"
View Source
var DEFAULT_COOKIE_PATH string = "./cookie"
Functions ¶
This section is empty.
Types ¶
type JwxtClient ¶
type JwxtClient struct { *request.HttpClient UId string User *user }
func NewClient ¶
func NewClient(UId string) *JwxtClient
func (*JwxtClient) CasFirstGet ¶
func (c *JwxtClient) CasFirstGet(LoginForm *LoginForm)
向cas中央认证系统获取验证码
func (*JwxtClient) CheckLogin ¶
func (c *JwxtClient) CheckLogin() bool
func (*JwxtClient) GetCoursePhase ¶
func (c *JwxtClient) GetCoursePhase() *course.CoursePhase
func (*JwxtClient) GetFavicon ¶
func (c *JwxtClient) GetFavicon() []byte
func (*JwxtClient) GetStudentImg ¶
func (c *JwxtClient) GetStudentImg(id string) []byte
func (*JwxtClient) GetTeacherImg ¶
func (c *JwxtClient) GetTeacherImg(id string) []byte
func (*JwxtClient) GetUserInfo ¶
func (c *JwxtClient) GetUserInfo() *user
func (*JwxtClient) ListCourse ¶
func (c *JwxtClient) ListCourse(courseType string, opts ...course.ReqOptionSetter) *course.CourseList
获取所有页的课程
func (*JwxtClient) ListCourseWithPage ¶
func (c *JwxtClient) ListCourseWithPage(courseType string, pageNo int, opts ...course.ReqOptionSetter) *course.CourseList
获取特定页
func (*JwxtClient) ListMajCompCourse ¶
func (c *JwxtClient) ListMajCompCourse(opts ...course.ReqOptionSetter) *course.CourseList
专必
func (*JwxtClient) ListMajElecCourse ¶
func (c *JwxtClient) ListMajElecCourse(opts ...course.ReqOptionSetter) *course.CourseList
专选
func (*JwxtClient) ListPubElecCourse ¶
func (c *JwxtClient) ListPubElecCourse(opts ...course.ReqOptionSetter) *course.CourseList
公选
func (*JwxtClient) Login ¶
func (c *JwxtClient) Login() bool
func (*JwxtClient) LoginWithCookies ¶
func (c *JwxtClient) LoginWithCookies() (isLogin bool, err error)
func (*JwxtClient) LoginWithForm ¶
func (c *JwxtClient) LoginWithForm(LoginForm *LoginForm) bool
type LoginForm ¶
type LoginForm struct { Username, Password, Captcha string // contains filtered or unexported fields }
func NewLoginForm ¶
func NewLoginForm() *LoginForm
func (*LoginForm) ConvertToUrlVal ¶
Click to show internal directories.
Click to hide internal directories.