Documentation ¶
Index ¶
- Variables
- func UnmarshalNestedString(src string, dst any) error
- type AbsentType
- type AllCreditInfo
- type BoarderRow
- type Canteen
- type CanteenDay
- type Class
- type Classroom
- type DBI
- type Date
- type DayParts
- type DayPlan
- type Event
- type EventType
- type Grade
- type HeaderItem
- type Homework
- type Info
- type MenuItem
- type Mergeable
- type Note
- type Parents
- type Period
- type Plan
- type ProcessState
- type ProcessType
- type Results
- type StringJsonObject
- type StudentAbsentType
- type Students
- type Subject
- type SubstitionType
- type Teacher
- type TicketRow
- type Time
- type Timeline
- type TimelineItem
- type Timetable
- type TimetableItem
- type User
- type UserEventType
- type UserRow
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ItemTypeMessage = "sprava" ItemTypeHomework = "homework" )
View Source
var (
ErrUnobtainableAttachments = errors.New("couldn't obtain attachments")
)
View Source
var (
TimeFormat = "2006-01-02 15:04:05"
)
View Source
var (
TimeFormatYearMonthDay = "2006-01-02"
)
Functions ¶
func UnmarshalNestedString ¶
Types ¶
type AbsentType ¶
type AllCreditInfo ¶
type AllCreditInfo struct { }
type BoarderRow ¶
type BoarderRow struct { ID string `json:"stravnikid"` Edupage string `json:"edupage"` Type string `json:"typ"` AgendaID string `json:"agendaid"` Name string `json:"meno"` Surname string `json:"priezvisko"` Subname interface{} `json:"subname"` Class string `json:"trieda"` Chips string `json:"cipy"` Credits string `json:"kredit"` Backup interface{} `json:"zaloha"` AllCreditInfo string `json:"allKreditInfo"` HardMode bool `json:"hardMode"` BoarderCount json.Number `json:"pocetStravnikov"` Note interface{} `json:"poznamka"` Alergens interface{} `json:"alergeny"` Histamin json.Number `json:"histamin"` Birthdate string `json:"birthdate"` DateTo string `json:"dateto"` AgeGroup json.Number `json:"vekova_skupina"` Active json.Number `json:"active"` Visible json.Number `json:"visible"` DeletedByUser json.Number `json:"deletedByUser"` Status string `json:"stav"` RowChanged string `json:"row_changed"` User string `json:"user"` FullName string `json:"fullName"` }
func (*BoarderRow) GetAllCreditInfo ¶
func (b *BoarderRow) GetAllCreditInfo() AllCreditInfo
type CanteenDay ¶
type CanteenDay struct { AvailableFrom string `json:"vydaj_od"` AvailableTo string `json:"vydaj_do"` FoodTypes json.Number `json:"drugov_jedal"` IsCooking bool `json:"isCooking"` IsPickUp bool `json:"isPickUp"` IsChoosable bool `json:"isChoosable"` VisibleMenus map[json.Number]bool `json:"visibleMenus"` ChoosableMenus map[json.Number]bool `json:"choosableMenus"` UnsubscribeOnlyWholeDay bool `json:"odhlasIbaCelyDen"` OrderableUntil string `json:"prihlas_do"` CancelableUntil string `json:"odhlas_do"` ChangeTo string `json:"zmen_do"` Edupage string `json:"edupage"` IsSemiChoosable string `json:"isSemiChoosable"` Rows []TicketRow `json:"rows"` Name string `json:"nazov"` Alergens string `json:"alergenyStr"` Menus map[json.Number]MenuItem `json:"menus"` MenuNames map[json.Number]struct { Name string `json:"nazov"` ShortName string `json:"skratka"` } `json:"nazvyMenu"` Evidence struct { Status string `json:"stav"` Obj string `json:"obj"` PovObj string `json:"pov_obj"` RowChanged string `json:"row_changed"` TZRowChanged string `json:"tz_row_changed"` } `json:"evidencia"` IsRating bool `json:"isRating"` RateFrom string `json:"rate_od"` RateTo string `json:"rate_do"` }
type DBI ¶
type DBI struct { Teachers map[string]Teacher `json:"teachers"` Classes map[string]Class `json:"classes"` Subjects map[string]Subject `json:"subjects"` Classrooms map[string]Classroom `json:"classrooms"` Students map[string]Students `json:"students"` Parents map[string]Parents `json:"parents"` Periods map[json.Number]Period `json:"periods"` DayParts map[string]DayParts `json:"dayparts"` AbsentTypes map[string]AbsentType `json:"absenttypes"` SubstitutionTypes map[string]SubstitionType `json:"substitutiontypes"` StudentAbsentTypes map[string]StudentAbsentType `json:"studentabsenttypes"` EventTypes map[string]UserEventType `json:"eventtypes"` ProcessTypes map[string]ProcessType `json:"processtypes"` ProcessStates map[string]ProcessState `json:"processstates"` IsStudentAdult bool `json:"isstudentadult"` }
func (*DBI) UnmarshalJSON ¶
type EventType ¶
type EventType struct { ID string `json:"id"` C string `json:"c"` Name string `json:"name"` TTCancel bool `json:"ttcancel"` CTCan bool `json:"ctcan"` ClassRequired bool `json:"classrequired"` Publish string `json:"publish"` NoCustomTime bool `json:"nocustomtime"` HideFields []string `json:"hidefields"` DP bool `json:"dp"` Lesson bool `json:"lesson"` Attendance bool `json:"attendance"` DPrivacy string `json:"d_privacy"` CTEvent bool `json:"ctevent"` TemplateID string `json:"templateid"` CategoryID string `json:"categoryid"` SubID string `json:"subId"` }
type Grade ¶
type Grade struct { Provider string `json:"provider"` ID string `json:"znamkaid"` StudentID string `json:"studentid"` SubjectID string `json:"predmetid"` EventID string `json:"udalostID"` Month string `json:"mesiac"` Data string `json:"data"` Date Time `json:"datum"` TeacherID string `json:"ucitelid"` Signed string `json:"podpisane"` SignedAdult string `json:"podpisane_rodic"` Timestamp Time `json:"timestamp"` State string `json:"stav"` }
type HeaderItem ¶
type HeaderItem struct { SubjectID string `json:"subjectid"` Changes interface{} `json:"changes"` }
type Homework ¶
type Homework struct { ID string `json:"hwkid"` HomeworkID string `json:"homeworkid"` ESuperID string `json:"e_superid"` UserID string `json:"userid"` LessonID json.Number `json:"predmetid"` PlanID string `json:"planid"` Name string `json:"name"` Details string `json:"details"` DateTo string `json:"dateto"` DateFrom string `json:"datefrom"` DatetimeTo string `json:"datetimeto"` DatetimeFrom string `json:"datetimefrom"` DateCreated string `json:"datecreated"` Period interface{} `json:"period"` Timestamp string `json:"timestamp"` TestID string `json:"testid"` Type string `json:"typ"` LikeCount json.Number `json:"pocet_like"` ReactionCount json.Number `json:"pocet_reakcii"` DoneCount json.Number `json:"pocet_done"` State string `json:"stav"` LastResult string `json:"posledny_vysledok"` Groups []string `json:"skupiny"` ETestCards int `json:"etestCards"` ETestAnswerCards int `json:"etestAnswerCards"` StudyTopics interface{} `json:"studyTopics"` GradeEventID interface{} `json:"znamky_udalostid"` StudentsHidden string `json:"students_hidden"` Data StringJsonObject `json:"data"` EvaluationStatus string `json:"stavhodnotetimelinePathd"` Ended interface{} `json:"skoncil"` MissingNextLesson bool `json:"missingNextLesson"` Attachments interface{} `json:"attachements"` AuthorName string `json:"autor_meno"` LessonName string `json:"predmet_meno"` }
type Info ¶
type Info struct { Credit float64 `json:"kredit"` CreditBackup interface{} `json:"zalohaKredit"` FirstMinusDate string `json:"prvyMinusDate"` LastOkDate string `json:"poslednyOkDate"` InterruptDay interface{} `json:"prerusDen"` HasInterruptObject interface{} `json:"maPreruseneObj"` BoarderID string `json:"stravnikid"` Info2 struct { Credit float64 `json:"kredit"` PomCredit string `json:"pomKredit"` DayCount int `json:"pocetDni"` DebugDays []interface{} `json:"debugDni"` Done bool `json:"done"` } `json:"info2"` HistaminShow string `json:"showOnlyAffected"` Alergens map[json.Number]struct { ID int `json:"id"` Tag string `json:"ozn"` Name string `json:"nazov"` Visible bool `json:"visible"` } `json:"alergenyIDS"` BoarderRow BoarderRow `json:"strRow"` }
type MenuItem ¶
type MenuItem struct { Name string `json:"nazov"` MenuName string `json:"nazovMenu"` MenuShortName string `json:"skratkaMenu"` Alergens string `json:"alergenyStr"` AlergenIDs map[json.Number]bool `json:"alergenyIDS"` Weights string `json:"hmotnostiStr"` MeatOrigin map[string]bool `json:"povodMasa"` }
type Plan ¶
type Plan struct { Period string `json:"uniperiod"` Type string `json:"type"` Header []HeaderItem `json:"header"` SubjectID string `json:"subjectid"` ClassIDs []string `json:"classids"` GroupNames []string `json:"groupnames"` LID string `json:"lid"` TeacherIDs []string `json:"teacherids"` ClassroomIDs []string `json:"classroomids"` StudentIDs []string `json:"studentids"` StartTime string `json:"starttime"` EndTime string `json:"endtime"` }
type ProcessState ¶
type ProcessType ¶
type Results ¶
func ParseResults ¶
type StringJsonObject ¶
type StringJsonObject struct {
Value map[string]interface{}
}
StringJsonObject contains stringed json object
func (*StringJsonObject) MarshalJSON ¶
func (n *StringJsonObject) MarshalJSON() ([]byte, error)
func (*StringJsonObject) UnmarshalJSON ¶
func (n *StringJsonObject) UnmarshalJSON(b []byte) error
type StudentAbsentType ¶
type Students ¶
type Students struct { ID string `json:"id"` ClassroomID string `json:"classroomid"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Parent1ID string `json:"parent1id"` Parent2ID string `json:"parent2id"` Parent3ID string `json:"parent3id"` Gender string `json:"gender"` DateFrom string `json:"datefrom"` DateTo string `json:"dateto"` NumberInClass string `json:"numberinclass"` IsOut bool `json:"isout"` Number string `json:"number"` DataCopy string `json:"kopiadata"` }
type SubstitionType ¶
type Teacher ¶
type Teacher struct { ID string `json:"id"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Short string `json:"short"` Gender string `json:"gender"` ClassroomID string `json:"classroomid"` DateFrom string `json:"datefrom"` DateTo string `json:"dateto"` IsOut bool `json:"isout"` }
type Time ¶
Time is a representation of time instances to help with parsing.
func (*Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type Timeline ¶
type Timeline struct { Homeworks map[string]Homework Items map[string]TimelineItem }
Timeline contains all timeline information
func ParseTimeline ¶
func (*Timeline) GetHomeworkFromTimeline ¶
type TimelineItem ¶
type TimelineItem struct { ID string `json:"timelineid"` Timestamp Time `json:"timestamp"` ReactionTo string `json:"reakcia_na"` Type string `json:"typ"` User string `json:"user"` TargetUser string `json:"target_user"` UserName string `json:"user_meno"` OtherID string `json:"ineid"` Text string `json:"text"` TimeAdded Time `json:"cas_pridania"` TimeEvent Time `json:"cas_udalosti"` Data StringJsonObject `json:"data"` Owner string `json:"vlastnik"` OwnerName string `json:"vlastnik_meno"` ReactionCount int `json:"poct_reakcii"` LastReaction string `json:"posledna_reakcia"` PomocnyZaznam string `json:"pomocny_zaznam"` Removed json.Number `json:"removed"` TimeAddedBTC Time `json:"cas_pridania_btc"` LastReactionBTC Time `json:"cas_udalosti_btc"` }
func (*TimelineItem) GetAttachments ¶
func (i *TimelineItem) GetAttachments() (map[string]string, error)
func (*TimelineItem) IsHomeworkWithAttachments ¶
func (i *TimelineItem) IsHomeworkWithAttachments() bool
type Timetable ¶
type Timetable struct {
Days map[string][]TimetableItem // key format is YYYY-MM-dd or 2006-01-02
}
func ParseTimetable ¶
type TimetableItem ¶
type TimetableItem struct { Type string `json:"type"` Date string `json:"date"` Period string `json:"uniperiod"` StartTime string `json:"starttime"` EndTime string `json:"endtime"` SubjectID string `json:"subjectid"` ClassIDs []string `json:"classids"` GroupNames []string `json:"groupnames"` IGroupID string `json:"igroupid"` TeacherIDs []string `json:"teacherids"` ClassroomIDs []string `json:"classroomids"` StudentIDs []string `json:"studentids"` Colors []string `json:"colors"` Duration json.Number `json:"durationperiods"` }
type User ¶
type User struct { Edubar map[string]interface{} `json:"_edubar"` Timeline []TimelineItem `json:"items"` // Only recent timeline, see EdupageClient.Timeline for more DBI DBI `json:"dbi"` UserRow UserRow `json:"userrow"` EventTypes []EventType `json:"eventtypes"` UserGroups []string `json:"usergroups"` DayPlan DayPlan `json:"dp"` NamedayToday string `json:"meninyDnes"` NamedayTommorrow string `json:"meninyZajtra"` }
type UserEventType ¶
Click to show internal directories.
Click to hide internal directories.