Documentation ¶
Index ¶
- Constants
- type Bool
- type Center
- type Client
- func (c Client) FetchAllContactAttributes(contactID string) ([]ContactAttribute, error)
- func (c Client) FetchAllCourseSubjects() ([]CourseSubject, error)
- func (c Client) FetchAllDebitors() ([]FullContact, error)
- func (c Client) FetchAllEmployees() ([]FullContact, error)
- func (c Client) FetchAllPupils() ([]FullContact, error)
- func (c Client) FetchAllTeachers() ([]FullContact, error)
- func (c Client) FetchCenters() ([]Center, error)
- func (c Client) FetchCourses(date string) ([]Course, error)
- func (c Client) FetchFullContact(id string) (*FullContact, error)
- func (c Client) FetchMeetings(courseID string) ([]Meeting, error)
- func (c *Client) Logout() error
- func (c *Client) SwitchToCenter(id string) error
- type Contact
- type ContactAttribute
- type ContactAttributeKey
- type Course
- type CourseMember
- type CourseSubject
- type Email
- type ErrorResponseData
- type FullContact
- type LoginCredentials
- type Meeting
- type Phone
Constants ¶
View Source
const (
// OnlineCourseRoom is the room number used to mark an online course.
OnlineCourseRoom = "99"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Center Center // contains filtered or unexported fields }
Client is used to operate with the ICAS system.
func NewClient ¶
func NewClient(url string, creds LoginCredentials) (*Client, error)
NewClient creates a new ICAS client. The ICAS client is needed to operate with ICAS.
func (Client) FetchAllContactAttributes ¶
func (c Client) FetchAllContactAttributes(contactID string) ([]ContactAttribute, error)
func (Client) FetchAllCourseSubjects ¶
func (c Client) FetchAllCourseSubjects() ([]CourseSubject, error)
func (Client) FetchAllDebitors ¶
func (c Client) FetchAllDebitors() ([]FullContact, error)
func (Client) FetchAllEmployees ¶
func (c Client) FetchAllEmployees() ([]FullContact, error)
func (Client) FetchAllPupils ¶
func (c Client) FetchAllPupils() ([]FullContact, error)
func (Client) FetchAllTeachers ¶
func (c Client) FetchAllTeachers() ([]FullContact, error)
func (Client) FetchCenters ¶
func (Client) FetchFullContact ¶
func (c Client) FetchFullContact(id string) (*FullContact, error)
func (*Client) SwitchToCenter ¶
SwitchToCenter switches to the specified center by the given id.
type Contact ¶
type Contact struct { ContactID string `json:"contact_id"` // Center string `json:"center"` // Alpha string `json:"alpha"` // Group string `json:"group"` LastName string `json:"name"` FirstName string `json:"firstname"` // Title string `json:"title"` // Birthdate string `json:"birthdate"` // Gender string `json:"gender"` // Company string `json:"company"` // Salutation string `json:"salutation"` DisplayName string `json:"display_name"` }
type ContactAttribute ¶
type ContactAttribute struct { ContactAttributeID string `json:"contact_attribute_id"` // ContactID string `json:"contact_id"` Key ContactAttributeKey `json:"key"` Value string `json:"value"` }
type ContactAttributeKey ¶
type ContactAttributeKey string
ContactAttributeKey represents attribute keys of a contact.
const ( // ZoomPMI represents the contact attribute key of the zoom pmi. ZoomPMI ContactAttributeKey = "zoompmi" )
type Course ¶
type Course struct { CourseID string `json:"course_id"` CenterID string `json:"center_id"` TeacherID string `json:"teacher_id"` TeacherDisplayName string `json:"teacher_display_name"` // Day string `json:"day"` Room string `json:"room"` // StatsOn string `json:"starts_on"` // EndsOn string `json:"ends_on"` StartsAt string `json:"starts_at"` EndsAt string `json:"ends_at"` // Duration string `json:"duration"` // MaxMembers string `json:"max_members"` // Vacation Bool `json:"vacation"` SubjectShort string `json:"subject_short"` Draft Bool `json:"draft"` // FixedFee string `json:"fixed_fee"` // CreatedAt string `json:"created_at"` // ModifiedAt string `json:"modified_at"` // SubtituteID string `json:"substitute_id"` SubtituteTeacherID string `json:"substitute_teacher_id"` SubtituteTeacherDisplayName string `json:"substitute_teacher_display_name"` Dropped Bool `json:"dropped"` // BG string `json:"bg"` TeacherAttendanceID string `json:"teacher_attendance_id"` // NeedsDocumentation Bool `json:"needs_documentation"` CourseMembers []CourseMember `json:"course_member"` // Quarter int `json:"quarter"` CourseMembersTotal int `json:"course_members_total"` CourseMembersExcused int `json:"course_members_excused"` }
Course is a list containing ICAS courses.
type CourseMember ¶
type CourseMember struct { // CourseMemberID string `json:"course_member_id"` PupilID string `json:"pupil_id"` // CourseID string `json:"course_id"` SubjectShort string `json:"subject_short"` // Day string `json:"day"` // StartsOn string `json:"starts_on"` // EndsOn string `json:"ends_on"` // Postponed Bool `json:"postponed"` Draft Bool `json:"draft"` External Bool `json:"external"` // CreatedAt string `json:"created_at"` // ModifiedAt string `json:"modified_at"` // PupilAttendanceID string `json:"pupil_attendance_id"` AttendanceType string `json:"attendance_type"` }
CourseMember holds any information about a course' member.
type CourseSubject ¶
type Email ¶
type Email struct { // EmailID string `json:"email_id"` // ContactID string `json:"contact_id"` Email string `json:"email"` }
type ErrorResponseData ¶
type ErrorResponseData struct { Type string `json:"type"` Title string `json:"title"` Status uint16 `json:"status"` Detail string `json:"detail"` }
ErrorResponseData contains the error information when a request failed somehow.
type FullContact ¶
type LoginCredentials ¶
LoginCredentials struct stores the login credentials needed to login to ICAS.
type Meeting ¶
type Meeting struct { // MeetingID string `json:"meeting_id"` // CourseID string `json:"course_id"` // MeetingNumber string `json:"meeting_number"` // JoinURL string `json:"join_url"` // PasswordPlain string `json:"password_plain"` // CreatedAt string `json:"created_at"` // CourseTeacherID string `json:"course_teacher_id"` TeacherZoomPMI string `json:"teacher_zoompmi"` TeacherPMURL string `json:"teacher_pm_url"` }
Click to show internal directories.
Click to hide internal directories.