edulink-api / Exports / Edulink_Raw
This class houses all the raw requests to the Edulink API. Properties that the methods require need to initialized with the Edulink_Raw.initialize method.
- Achievement
- AchievementBehaviourLookups
- Attendance
- Behaviour
- Catering
- Clubs
- Documents
- Exams
- ExternalLinks
- Homework
- HomeworkCompleted
- HomeworkDetails
- Login
- Logout
- Personal
- Ping
- RegisterCodes
- SchoolDetails
- School_FromCode
- Status
- Timetable
- initialize
• new Edulink_Raw()
• Private
generic_header: Object
This houses the authentication bearer
Name | Type |
---|---|
Authorization |
string |
Raw_Edulink_Requests/Edulink_Raw.ts:50
• learner_id: string
The ID of the current signed in user
Raw_Edulink_Requests/Edulink_Raw.ts:40
• school_server: string
The base server that requests are made to
Raw_Edulink_Requests/Edulink_Raw.ts:45
• Private
get
generic_data(): Object
This returns some fields needed in the data section of the other requests
Object
Name | Type |
---|---|
id |
string |
jsonrpc |
string |
uuid |
string |
Raw_Edulink_Requests/Edulink_Raw.ts:74
▸ Achievement(): Promise
<Edulink_Achievement
>
Returns the data from the achievements
section of edulink
Promise
<Edulink_Achievement
>
A promise that resolves to the Edulink_Achievement response
Raw_Edulink_Requests/Edulink_Raw.ts:250
▸ AchievementBehaviourLookups(): Promise
<Edulink_AchievementBehaviourLookups
>
Gets a look up table for the Edulink_Achievement and Edulink_Behaviour responses
Promise
<Edulink_AchievementBehaviourLookups
>
A promise that resolves to the Edulink_AchievementBehaviourLookups response, this is a look up table for the Edulink_Achievement and Edulink_Behaviour responses
Raw_Edulink_Requests/Edulink_Raw.ts:198
▸ Attendance(): Promise
<Edulink_Attendance
>
Returns the data from the attendance
section of edulink
Promise
<Edulink_Attendance
>
A promise that resolves to the Edulink_Attendance response
Raw_Edulink_Requests/Edulink_Raw.ts:277
▸ Behaviour(): Promise
<Edulink_Behaviour
>
Gets the results from the Behaviour
section of edulink
Promise
<Edulink_Behaviour
>
A promise that resolves to the Edulink_Behaviour response
Raw_Edulink_Requests/Edulink_Raw.ts:170
▸ Catering(): Promise
<Edulink_Catering
>
Returns the data from the catering
section of edulink
Promise
<Edulink_Catering
>
A promise that resolves to the Edulink_Catering response
Raw_Edulink_Requests/Edulink_Raw.ts:305
▸ Clubs(member?
): Promise
<Edulink_Clubs
>
Returns the data from the clubs
section of edulink
Name | Type | Default value | Description |
---|---|---|---|
member |
boolean |
true |
If true clubs that the learner is a member of will be returned, if false clubs that the learner is not a member of will be returned |
Promise
<Edulink_Clubs
>
A promise that resolves to the Edulink_Clubs response
Raw_Edulink_Requests/Edulink_Raw.ts:460
▸ Documents(): Promise
<Edulink_Documents
>
Gets the results from the documents
section of edulink
Promise
<Edulink_Documents
>
A promise that resolves to the Edulink_Documents response
Raw_Edulink_Requests/Edulink_Raw.ts:116
▸ Exams(): Promise
<Edulink_Exams
>
Gets the results from the exams
section of edulink
Promise
<Edulink_Exams
>
A promise that resolves to the Edulink_Exams response
Raw_Edulink_Requests/Edulink_Raw.ts:143
▸ ExternalLinks(): Promise
<Edulink_ExternalLinks
>
Returns the data from the external links
section of edulink
Promise
<Edulink_ExternalLinks
>
A promise that resolves to the Edulink_ExternalLinks response
Raw_Edulink_Requests/Edulink_Raw.ts:434
▸ Homework(): Promise
<Edulink_Homework
>
Returns the data from the Homework
section of edulink
Promise
<Edulink_Homework
>
A promise that resolves to the Edulink_Homework response
Raw_Edulink_Requests/Edulink_Raw.ts:332
▸ HomeworkCompleted(homework_id
, homework_source
, complete
): Promise
<any
>
Change the completion status of a homework
Name | Type | Description |
---|---|---|
homework_id |
number |
The id of the homework to change completion for |
homework_source |
"SIMS" | "EduLink" |
- |
complete |
boolean |
A boolean representing the homework's new completion status |
Promise
<any
>
//TODO: Add return type
Raw_Edulink_Requests/Edulink_Raw.ts:361
▸ HomeworkDetails(homework_id
, source
): Promise
<Edulink_HomeworkDetails
>
Request additional details about a homework
Name | Type | Description |
---|---|---|
homework_id |
string | number |
The id of the homework to request details for |
source |
"SIMS" | "EduLink" |
the way the homework was added normally through "SIMS" or "EduLink" |
Promise
<Edulink_HomeworkDetails
>
A promise that resolves to the Edulink_HomeworkDetails response
Raw_Edulink_Requests/Edulink_Raw.ts:400
▸ Login(username
, password
, establishment_id
, server?
): Promise
<Edulink_Login
>
Name | Type | Description |
---|---|---|
username |
string |
The username that should be used for authentication |
password |
string |
The password that should be used for authentication |
establishment_id |
number |
The id of the establishment that the user is trying to authenticate against, this is provided in Edulink_SchoolDetails |
server |
string |
The server to authenticate with. |
Promise
<Edulink_Login
>
A promise that resolves to the Edulink_Login response, this response contains important data about room and group ids
Raw_Edulink_Requests/Edulink_Raw.ts:624
▸ Logout(): Promise
<Edulink_Logout
>
Logs the user out of the school server, this will render most of the class useless as authentication is required for the methods to run
Promise
<Edulink_Logout
>
A promise that resolves to the Edulink_Logout response
Raw_Edulink_Requests/Edulink_Raw.ts:659
▸ Personal(): Promise
<Edulink_Personal
>
Returns the data from the personal
section of edulink
Promise
<Edulink_Personal
>
A promise that resolves to the Edulink_Personal response
Raw_Edulink_Requests/Edulink_Raw.ts:488
▸ Ping(): Promise
<Edulink_Ping
>
Ping's the server to keep the session alive //TODO: See how long the default session is and how long it should be
Promise
<Edulink_Ping
>
A promise that resolves to the Edulink_Ping response
Raw_Edulink_Requests/Edulink_Raw.ts:684
▸ RegisterCodes(): Promise
<Edulink_RegisterCodes
>
TODO: Can't remeber what this is
Promise
<Edulink_RegisterCodes
>
Raw_Edulink_Requests/Edulink_Raw.ts:225
▸ SchoolDetails(school_server?
): Promise
<Edulink_SchoolDetails
>
Returns information about the login options of the school as well as the school name and id, see Edulink_SchoolDetails
Name | Type | Description |
---|---|---|
school_server |
string |
The school_server to query information about |
Promise
<Edulink_SchoolDetails
>
information about the login options of the school as well as the school name and id, see Edulink_SchoolDetails
Raw_Edulink_Requests/Edulink_Raw.ts:569
▸ School_FromCode(school_code
, server?
): Promise
<School_FromCode
>
Returns a response that contains the school_code of a school from the school_server
Name | Type | Default value | Description |
---|---|---|---|
school_code |
string |
undefined |
|
server |
string |
'https://provisioning.edulinkone.com/' |
The server to use to find the school_code. This should always be the default unless you're debugging or something. |
Promise
<School_FromCode
>
A promise that resolves to a response object that contains the school code and server.
Raw_Edulink_Requests/Edulink_Raw.ts:599
▸ Status(): Promise
<Edulink_Status
>
Returns the current status of the user sign in as well as info about the user's upcoming whereabouts, see Edulink_Status
Promise
<Edulink_Status
>
A promise that resolves to the Edulink_Status response
Raw_Edulink_Requests/Edulink_Raw.ts:515
▸ Timetable(date
): Promise
<Edulink_Timetable
>
Gets the timetable for the current user from a given date
Name | Type | Description |
---|---|---|
date |
string |
should be in format: YYYY-MM-DD, this is the start date of the range by default edulink will return 16 days of data //TODO: Fact check this is always true |
Promise
<Edulink_Timetable
>
A promise that resolves to the Edulink_Attendance response
Raw_Edulink_Requests/Edulink_Raw.ts:88
▸ initialize(authtoken
, learner_id
, school_server
): Promise
<void
>
Name | Type | Description |
---|---|---|
authtoken |
string |
The authtoken to pass to requests, this is obtained from the Edulink_Login response |
learner_id |
string |
The learner_id to pass to requests, this is obtained from the Edulink_Login response |
school_server |
string |
The school_server to pass to requests, this is obtained from the Edulink_SchoolDetails response |
Promise
<void
>