Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// supplied username
//
// e.g. JOHNDOE08
APIUsername string
// supplied password
//
// e.g. *****
APIPassword string
// supplied school prefix
//
// e.g. ui
APISchoolPrefix string
// the base url that will be requested
//
// e.g. ui.compass.education
BaseURL string
// the cookies which are created
APICookies string
// your user id
APIUserId float64
}
func (*API) GetAllLocations ¶
Retrieves locations.
The function takes the provided session 'cookies' & 'schoolId' to make a request to the Compass Education API and fetch locations.
Returns:
- []types.LC: A slice of locations in the form of 'types.LC'.
- error: An error, if any, that occurred during the API request or processing of the response.
func (*API) GetAllStaff ¶
Retrieves staff.
The function takes the provided session 'cookies' & 'schoolId' to make a request to the Compass Education API and fetch staff.
Returns:
- []types.User: A slice of staff in the form of 'types.User'.
- error: An error, if any, that occurred during the API request or processing of the response.
func (*API) GetClasses ¶
Retrieves calendar events for a specified user within a date range.
The function takes the provided session 'cookies', 'schoolId', 'userId', 'startDate', and 'endDate' to make a request to the Compass Education API and fetch calendar events for the specified user within the given date range.
Parameters:
- startDate: The start date of the range for which calendar events are requested.
- endDate: The end date of the range for which calendar events are requested.
Returns:
- []types.CalendarTransport: A slice of calendar events in the form of 'types.CalendarTransport'.
- error: An error, if any, that occurred during the API request or processing of the response.