Documentation
¶
Index ¶
- Constants
- type Grade
- type MessageContent
- type MessageInfo
- type MobiAPI
- func (api *MobiAPI) ExtendSession() error
- func (api *MobiAPI) GetGrades(semester int) (map[string][]Grade, error)
- func (api *MobiAPI) GetMessageContent(message MessageInfo) (MessageContent, error)
- func (api *MobiAPI) GetName() string
- func (api *MobiAPI) GetReceivedMessages(firstpage bool) ([]MessageInfo, error)
- func (api *MobiAPI) GetSentMessages(firstpage bool) ([]MessageInfo, error)
- func (api *MobiAPI) GetUID() int
- func (api *MobiAPI) LoggedIn(noprecache bool) bool
- func (api *MobiAPI) Logout() (bool, error)
- func (api *MobiAPI) PasswordAuth(login, password string) (bool, error)
- func (api *MobiAPI) SearchMessages(phrase string) ([]MessageInfo, error)
- func (api *MobiAPI) SetDomain(domain string) error
- func (api *MobiAPI) SetupProxy(proxyurl string, noverifytls bool) error
- func (api *MobiAPI) TokenAuth(token string) (bool, error)
Constants ¶
const ( MessageSent = 1 MessageReceived = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageContent ¶
type MessageContent struct { Info MessageInfo Content string RawContent string Downloads map[string]string }
type MobiAPI ¶
type MobiAPI struct { OnLostConnection func() // contains filtered or unexported fields }
func (*MobiAPI) ExtendSession ¶
Does a random request to extend session
func (*MobiAPI) GetMessageContent ¶
func (api *MobiAPI) GetMessageContent(message MessageInfo) (MessageContent, error)
Read Received Message from MessageInfo into MessageContent.
func (*MobiAPI) GetReceivedMessages ¶
func (api *MobiAPI) GetReceivedMessages(firstpage bool) ([]MessageInfo, error)
Scrapes and returns message IDs and titles from first or every subsequent page in the form of MessageInfo. Use GetMessageContent() with MessageInfo to read it.
func (*MobiAPI) GetSentMessages ¶
func (api *MobiAPI) GetSentMessages(firstpage bool) ([]MessageInfo, error)
Scrapes and returns message IDs and titles from first or every subsequent page in the form of MessageInfo. Use GetMessageContent() with MessageInfo to read it.
func (*MobiAPI) PasswordAuth ¶
Authenticate with password.
func (*MobiAPI) SearchMessages ¶
func (api *MobiAPI) SearchMessages(phrase string) ([]MessageInfo, error)
Searches messages using MobiDziennik's built-in search feature.
func (*MobiAPI) SetDomain ¶
Check if domain is accessible and if it is, use it. If the domain doesn't contain any dots it will be treated as a mobidziennik.pl subdomain.
func (*MobiAPI) SetupProxy ¶
Set proxy server to use and whenever to allow invalid TLS certificates. Useful for development