Documentation
¶
Overview ¶
Package department provides functionality to fetch university departments and their teachers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct {
Name string // The name is the name of the department, e.g. "Informatica - Scienza e Ingegneria"
Code string // The code is the subdomain of the department website, e.g. "disi" for "https://disi.unibo.it/it"
}
Department represents a department of the university.
func FetchDepartments ¶
func FetchDepartments() ([]Department, error)
FetchDepartments retrieves the list of departments of the university.
It gets the list from the university website via HTTP and then applies a regex to parse the HTML.
func (Department) FetchTeachers ¶
func (d Department) FetchTeachers() ([]Teacher, error)
func (Department) GetTeachersUrl ¶
func (d Department) GetTeachersUrl() string
func (Department) Url ¶
func (d Department) Url() string
type Teacher ¶
type Teacher struct {
Username string
}
Teacher represents a teacher.
func FetchTeachers ¶
FetchTeachers retrieves the list of teachers for the given department.
func (Teacher) GetWebsite ¶
GetWebsite returns the website of the teacher.
Click to show internal directories.
Click to hide internal directories.