Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct { Client *http.Client // Client is an HTTP client, which is authenticated on STiNE, if Login was successful SessionNo string // Identifier for the current session provided by STiNE, could be unique, empty string prior to successful Login }
Session represent a STiNE session. Think of it like an isolated tab with STiNE open.
func (*Session) GetCategories ¶
func (session *Session) GetCategories(depth int) (moduleGetter.Category, error)
GetCategories returns the moduleGetter.Category with modules and nested categories the user can register for.
The depth indicates how deep different categories are nested within a category - starting at 0, which returns the initial page.
func (*Session) Login ¶
Login authenticates a session on the STiNE website. If no error is returned, the user is logged in.
func (*Session) RegisterForModule ¶
func (session *Session) RegisterForModule(module moduleGetter.Module) *moduleRegisterer.ModuleRegistration
RegisterForModule registers the current authenticated user for the passed moduleGetter.Module. A moduleRegisterer.ModuleRegistration will be returned, which provides various functions for the registration.