api

package
v0.0.0-...-301f747 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package api provides entities for the appilcation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	ID      string     `json:"id"`
	Name    string     `json:"name"`
	Group   string     `json:"group"`
	Year    string     `json:"year"`
	Results []Result   `json:"results"`
	Total   ResultInfo `json:"total"`
	Final   string     `json:"final"`
}

Class is an entity for a class.

type Crawler

type Crawler interface {
	Refresh(userID string) error
}

The Crawler interface exposes the public crawler api.

type CrawlerConfig

type CrawlerConfig struct {
	UserID            string `json:"userId"`
	Status            bool   `json:"status"`
	Code              string `json:"code"`
	Nip               string `json:"nip"`
	NotificationEmail string `json:"notificationEmail"`
}

CrawlerConfig contains info about the crawler configuration.

type Result

type Result struct {
	Name     string     `json:"name"`
	Normal   ResultInfo `json:"normal"`
	Weighted ResultInfo `json:"weighted"`
}

Result is an entity for storing a result

type ResultInfo

type ResultInfo struct {
	Result      string `json:"result"`
	Average     string `json:"average"`
	StandardDev string `json:"standardDev"`
}

ResultInfo contains normal or weighted grades.

type Results

type Results struct {
	UserID     string    `json:"userId"`
	LastUpdate time.Time `json:"lastUpdate"`
	Classes    []Class   `json:"classes"`
}

Results contains all results for a user organized by class.

type User

type User struct {
	ID        string `json:"id"`
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

User contains info about users.

Jump to

Keyboard shortcuts

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