api

package
v0.0.0-...-e7aebcb Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOrderingTime

func CheckOrderingTime(orderingEndTime string) (bool, error)

func Orders

func Orders(sid string, canteen string) ([][]order, error)

Returns a list of orders

func PickOrders

func PickOrders(sid string, canteen string, userHash string) ([][]order, [][]order, error)

returns a list of picked orders, originally used orders and used filters and possibly an error

func RegisterBetatester

func RegisterBetatester(userHash string, registerHash string) error

func SendOrders

func SendOrders(request SendOrdersRequest, userHash string) error

Types

type AccountInfoResponse

type AccountInfoResponse struct {
	Konto             string `json:"konto"`
	VS                string `json:"vs"`
	Jmeno             string `json:"jmeno"`
	Email             string `json:"email"`
	Vydej             int    `json:"vydej"`
	Limit             string `json:"limit"`
	Vicenasobny       bool   `json:"vicenasobny"`
	PocetJidel        int    `json:"pocetJidel"`
	Podrobnosti       int    `json:"podrobnosti"`
	EditaceJidelnicku int    `json:"editaceJidelnicku"`
	ID                string `json:"id"`
	Cislo             string `json:"cislo"`
	BakalarID         string `json:"bakalarId"`
	Prihlaska         int    `json:"prihlaska"`
	Pasivni           bool   `json:"pasivni"`
	Verze             string `json:"verze"`
	Text              string `json:"text"`
	Mena              string `json:"mena"`
	Dochazka          string `json:"dochazka"`
	NazevJidelny      string `json:"nazevJidelny"`
}

func GetAccountInfo

func GetAccountInfo(sid string, canteen string) (*AccountInfoResponse, error)

type LoginRequest

type LoginRequest struct {
	Cislo           string `json:"cislo"`
	Jmeno           string `json:"jmeno"`
	Heslo           string `json:"heslo"`
	ZustatPrihlasen bool   `json:"zustatPrihlasen"`
	Environment     string `json:"environment"`
	Lang            string `json:"lang"`
}

type LoginResponse

type LoginResponse struct {
	Betatest        bool   `json:"betatest"`
	Cislo           string `json:"cislo"`
	IgnoreCert      bool   `json:"ignoreCert"`
	Jmeno           string `json:"jmeno"`
	S5url           string `json:"s5url"`
	SID             string `json:"sid"`
	Uzivatel        User   `json:"uzivatel"`
	Verze           string `json:"verze"`
	ZustatPrihlasen bool   `json:"zustatPrihlasen"`
}

type LoginReturn

type LoginReturn struct {
	SID      string `json:"sid"`
	Canteen  string `json:"canteen"`
	UserHash string `json:"user_hash"`
}

func Login

func Login(username string, password string, canteen string) (*LoginReturn, error)

Returns SID and the canteen number

type SendOrdersRequest

type SendOrdersRequest struct {
	Cislo      string `json:"cislo"`
	SID        string `json:"sid"`
	Url        string `json:"url"`
	Xml        string `json:"xml"`
	Lang       string `json:"lang"`
	IgnoreCert string `json:"ignoreCert"`
}

type User

type User struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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