gounistudium

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 7 Imported by: 0

README

go-unistudium

Api wrapper for unistudium written in go

Documentation

Index

Constants

View Source
const (
	ClassRoom      roomType = 0
	ExamRoom       roomType = 1
	GraduationRoom roomType = 245
)

Variables

This section is empty.

Functions

func Request added in v1.0.1

func Request(requestUrl string, payload *strings.Reader) (string, error)

Request retrieves the data from the University's website

Types

type Room

type Room struct {
	CourseName     string
	Professor      string
	Degree         string
	MeetingLink    string
	Time           string
	GraduationCode string
	Department     string
}

func FindRooms

func FindRooms(roomType roomType, query string) ([]Room, error)

FindRooms returns an array of type Room containing information about the rooms each room is defined by a Room struct it needs a roomType and a query such as the course name, the professor's name, the degree or any keyword related to the room that you are looking for.

func HtmlToRoom added in v1.0.1

func HtmlToRoom(node *html.Node, roomType roomType) (Room, error)

HtmlToRoom parses the HTML code into a struct of type Room

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL