Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Get(url string, query map[string]string) (resp *resty.Response, err error)
- func (c *Client) Grade(year int, term int, usePersonalGrade bool) (models.Result, error)
- func (c *Client) Info() (models.Result, error)
- func (c *Client) Login(sid string, password string) (models.Result, error)
- func (c *Client) LoginWithKaptcha(loginKaptcha models.LoginKaptcha, password string, kaptcha string) (models.Result, error)
- func (c *Client) Post(url string, data map[string]string, noRedirect bool) (resp *resty.Response, err error)
- func (c *Client) Schedule(year int, term int) (models.Result, error)
- type ClientOptions
Constants ¶
View Source
const ( KeyURL = "xtgl/login_getPublicKey.html" LoginURL = "xtgl/login_slogin.html" KaptchaURL = "kaptcha" InfoURL1 = "xsxxxggl/xsxxwh_cxCkDgxsxx.html" InfoURL2 = "xsxxxggl/xsgrxxwh_cxXsgrxx.html" ExtraInfoURL = "xszbbgl/xszbbgl_cxXszbbsqIndex.html?doType=details&gnmkdm=N106005" GradeURL = "cjcx/cjcx_cxDgXscj.html?doType=query&gnmkdm=N305005" PersonalGradeURL = "cjcx/cjcx_cxXsgrcj.html?doType=query&gnmkdm=N305005" ScheduleURL = "kbcx/xskbcx_cxXsKb.html?gnmkdm=N2151" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ClientOptions Cookies []*http.Cookie // cookies to be used for the requests Headers map[string]string // headers to be used for the requests Timeout int // timeout for the requests // contains filtered or unexported fields }
func (*Client) LoginWithKaptcha ¶
type ClientOptions ¶
type ClientOptions struct {
BaseURL string // base url of the api
}
Click to show internal directories.
Click to hide internal directories.