Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventDateStart = "DTSTART" EventDescription = "DESCRIPTION" EventSummary = "SUMMARY" )
View Source
const ( LoginURL = "https://ocjene.skole.hr/login" GradeAllURL = "https://ocjene.skole.hr/grade/all" CalendarURL = "https://ocjene.skole.hr/exam/ical" Timeout = 60 * time.Second // site can get really slow sometimes )
View Source
const ( ErrUnexpectedStatus = "unexpected status code %v" ErrCSRFToken = "could not find CSRF token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client structure holds all HTTP Client related fields.
func NewClientWithContext ¶
NewClientWithContext creates new *Client, initializing HTTP Cookie Jar, context and username with password.
func (*Client) GetResponse ¶
GetResponse attempts to fetch CSRF Token, do SSO/SAML request to have proper security and authentication cookies populated and then proceeds to fetch all subjects and their grades, as well as all calendar events for exams in ICS format, returning raw grades listing body, parsed exam events and optional error.
Click to show internal directories.
Click to hide internal directories.