kreta.js
v2.0.0
Published
Advanced and easy-to-use object-oriented module for the Student, Guardian and Teacher Kreta API.
Maintainers
Readme
Advanced and easy-to-use object-oriented module for the Student, Guardian and Teacher Kreta API.
Disclaimer • Features • Installation • Example • Exports • Methods • Licence • Issues • Contributing
Disclaimer
[!CAUTION] This project is not affiliated with the eKRÉTA Informatikai Zrt.. This is an unofficial API client for the Kréta Mobile API. Use the library at your own risk. The author does not take any responsibility for any damage caused by the usage of this library.
Features
- Object-oriented library
- Easy-to-use methods and classes
- Easy JSON conversion
- Object validation
- TypeScript support
Installation
Install the module with your favorite package manager.
$ npm install kreta.js
$ yarn add kreta.js
$ pnpm add kreta.jsBuild the module from source.
# Clone the repository
$ git clone https://github.com/blazsmaster/kreta.js.git
# Go to the project directory
$ cd kreta.js
# Install dependencies (with your favorite package manager)
$ npm install
# Build the module
$ npm run buildExample
// Import the module (CommonJS)
const { IdpApiV1, MobileApiV3 } = require('kreta.js');// Import the module (ES6)
import { IdpApiV1, MobileApiV3 } from 'kreta.js';
// Login with personal credentials
const idp = new IdpApiV1({
instituteCode: 'pelda-intezmeny',
password: 'abcd1234',
username: '1234567890',
});
// Example function implements the login and getStudent methods
async function tanuloNeve() {
// Obtain the access token
await idp.login().then(async (tokenObj) => {
// Create a new MobileApiV3 instance for the student API
const api = new MobileApiV3({
// Use the institute code from the IdpApiV1 instance (optional, but recommended)
instituteCode: idp.instituteCode,
// Use the access token from the response
accessToken: tokenObj.access_token,
});
// Get the student data
await api.getStudent().then((tanulo) => {
// Every method has a `json` property to return parsed and validated data
console.log(tanulo.json);
// Returns the student's name
return tanulo.Nev;
});
});
}
console.log(await tanuloNeve()); // Minta JánosExports
Classes
EAdminApiV1- E-Ügyintézés API methodsnew EAdminApiV1({ accessToken: '', });- Params:
accessToken– Access token obtained from IdpApiV1.login() or IdpApiV1.extendToken() or manually
- Params:
GlobalApiV1- Global API methods (unauthorized access)new GlobalApiV1();IdpApiV1- Authentication API (& util) methodsnew IdpApiV1({ instituteCode: '', password: '', username: '', });- Params:
instituteCode– Unique institute codestringpassword– Kreta passwordstringusername– Kreta usernamestring
- Params:
MobileApiV3- Student and Guardian API methodsnew MobileApiV3({ instituteCode: '', accessToken: '', });- Params:
instituteCode– Unique institute codestringaccessToken– Access token obtained from IdpApiV1.login() or IdpApiV1.extendToken() or manuallytokenType– Access token type (optional)string
- Params:
NaploApiV3- Teacher API methodsnew NaploApiV3({ instituteCode: '', accessToken: '', });- Params:
instituteCode– Unique institute codestringaccessToken– Access token obtained from IdpApiV1.login() or IdpApiV1.extendToken() or manually
- Params:
Functions
createKretaInsult- Generate a random Kreta insult based on the famous "DirtyWords.xml" filecreateKretaInsult('');- Args:
prefix- Prefix of the insult (optional)string(default: "Te")
- Args:
Namespaces and Interfaces
EAdminApiTypes- E-Ügyintézés API typesGlobalApiTypes- Global API typesIdpApiTypes- Authentication API typesMobileApiTypes- Student and Guardian API typesNaploApiTypes- Teacher API typesDateFilter- Date filter interfaceTimeTableDateFilter- Time table date filter interface
Methods
IdpApiV1
getNonce– Query nonceidp.getNonce();- Returns:
Promise<string>
- Returns:
login– Query token informationidp.login();- Returns:
Promise<AuthenticationDto>
- Returns:
extendToken– Renews the access tokenidp.extendToken({ instituteCode: '', refreshToken: '', refreshUserData: true, username: '', accessToken: '', tokenType: '', });Params:
instituteCode– Unique institute codestringrefreshToken– Refresh tokenstringrefreshUserData– Refresh user databooleanusername– Kreta usernamestringaccessToken– Access token (optional)stringtokenType– Token type (optional)string
Returns:
Promise<AuthenticationDto>
revokeRefreshToken– Revokes the refresh tokenidp.revokeRefreshToken('');Args:
token– Refresh tokenstring
Returns:
Promise<void>
isValidToken– Checks if the token is valididp.isValidToken('');Args:
token– Tokenstring
Returns:
boolean
resolveTokenData– Resolves the token dataidp.resolveTokenData('');Args:
token– Tokenstring
Returns:
TokenDto
GlobalApiV1
getGlobalConfigurationDescriptors– Query global configuration descriptorsglobalApi.getGlobalConfigurationDescriptors();- Returns:
Promise<Record<string, string>>
- Returns:
getInstitutesV1– Query all institutes (old version)globalApi.getInstitutesV1();- Returns:
Promise<Array<InstituteV1Dto>>
- Returns:
getInstitutes– Query all institutesglobalApi.getInstitutes();- Returns:
Promise<Array<InstituteDto>>
- Returns:
MobileApiV3
deleteBankAccountNumber– Deletes student's bank account datamobileApi.deleteBankAccountNumber();- Returns:
Promise<void>
- Returns:
deleteReservation– Cancels reservation for a scheduled consultation hourmobileApi.deleteReservation('');Args:
uid– Consultation hour unique identifierstring
Returns:
Promise<void>
downloadAttachment– Downloads an attachmentmobileApi.downloadAttachment('');Args:
uid– Attachment unique identifierstring
Returns:
Promise<Blob>
getAnnouncedTests– Retrieves announced tests within a specified date rangemobileApi.getAnnouncedTests({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start date (optional)stringendDate– End date (optional)string
Returns:
Promise<Array<AnnouncedTestDto>>
getAnnouncedTest– Retrieves details of an announced test by its unique identifiermobileApi.getAnnouncedTest('');Args:
uid– Announced test unique identifierstring
Returns:
Promise<AnnouncedTestDto>
getAnnouncedTestsByUids– Retrieves announced tests by their unique identifiersmobileApi.getAnnouncedTestsByUids(['']);Args:
uids– Announced test unique identifiersstring | Array<string>
Returns:
Promise<Array<AnnouncedTestDto>>
getClassAverage– Retrieves class averages for subjectsmobileApi.getClassAverage('');Args:
oktatasiNevelesiFeladatUid– Educational task unique identifierstringtantargyUid– Subject unique identifier (optional)string
Returns:
Promise<Array<ClassAverageDto>>
getClassMaster– Retrieves class masters by their unique identifiersmobileApi.getClassMaster(['']);Args:
uids– Class master unique identifiersstring | Array<string>
Returns:
Promise<Array<ClassMasterDto>>
getConsultingHour– Retrieves consulting hour details for guardiansmobileApi.getConsultingHour('');Args:
uid– Consulting hour unique identifierstring
Returns:
Promise<ConsultingHourDto>
getConsultingHours– Retrieves consulting hours for guardians within a specified date rangemobileApi.getConsultingHours({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start date (optional)stringendDate– End date (optional)string
Returns:
Promise<Array<ConsultingHourDto>>
getDeviceGivenState– Checks if a device has been allocated to the studentmobileApi.getDeviceGivenState();- Returns:
Promise<boolean>
- Returns:
getEvaluations– Retrieves student's evaluations within a specified date rangemobileApi.getEvaluations({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start datestringendDate– End datestring
Returns:
Promise<Array<EvaluationDto>>
getEvaluation– Retrieves details of an evaluation by its unique identifiermobileApi.getEvaluation('');Args:
uid– Evaluation unique identifierstring
Returns:
Promise<EvaluationDto>
getCertificateEvaluations– Retrieves student's certificate evaluationsmobileApi.getCertificateEvaluations();- Returns:
Promise<Array<EvaluationDto>>
- Returns:
getNonCertificateEvaluations– Retrieves student's non-certificate evaluationsmobileApi.getNonCertificateEvaluations();- Returns:
Promise<Array<EvaluationDto>>
- Returns:
getGroups– Retrieves groups and classes associated with the studentmobileApi.getGroups();- Returns:
Promise<Array<GroupDto>>
- Returns:
getGuardian4T– Retrieves guardian's informationmobileApi.getGuardian4T();- Returns:
Promise<Guardian4TDto>
- Returns:
getHomework– Retrieves homework details by its unique identifiermobileApi.getHomework('');Args:
uid– Homework unique identifierstring
Returns:
Promise<HomeworkDto>
getHomeworks– Retrieves homework within a specified date rangemobileApi.getHomeworks({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start datestringendDate– End datestring
Returns:
Promise<Array<HomeworkDto>>
getLEPEvents– Retrieves Lázár Ervin Program eventsmobileApi.getLEPEvents();- Returns:
Promise<Array<LEPEventDto>>
- Returns:
getLesson– Retrieves lesson details by its unique identifiermobileApi.getLesson('');Args:
orarendElemUid– Lesson unique identifierstring
Returns:
Promise<LessonDto>
getLessons– Retrieves lessons within a specified date rangemobileApi.getLessons({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start datestringendDate– End datestring
Returns:
Promise<Array<LessonDto>>
getNotes– Retrieves notes created by teachers during lessons within a specified date rangemobileApi.getNotes({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start datestringendDate– End datestring
Returns:
Promise<Array<NoteDto>>
getNote– Retrieves a note by its unique identifiermobileApi.getNote('');Args:
uid– Note unique identifierstring
Returns:
Promise<NoteDto>
getNoticeBoardItems– Retrieves notice board items visible to the studentmobileApi.getNoticeBoardItems();- Returns:
Promise<Array<NoticeBoardItemDto>>
- Returns:
getOmissions– Retrieves student's absences within a specified date rangemobileApi.getOmissions({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start date (optional)stringendDate– End date (optionAl)string
Returns:
Promise<Array<OmissionDto>>
getOmission– Retrieves absence details by its unique identifiermobileApi.getOmission('');Args:
uid– Absence unique identifierstring
Returns:
Promise<OmissionDto>
getRegistrationState– Checks if the guardian has registeredmobileApi.getRegistrationState();- Returns:
Promise<boolean>
- Returns:
getSchoolYearCalendar– Retrieves school year calendar entriesmobileApi.getSchoolYearCalendar();getStudent– Retrieves student's informationmobileApi.getStudent();- Returns:
Promise<StudentDto>
- Returns:
getSubjectAverage– Retrieves subject averages for the studentmobileApi.getSubjectAverage('');Args:
oktatasiNevelesiFeladatUid– Educational task unique identifierstring
Returns:
Promise<Array<SubjectAverageDto>>
getTeszekRegistration– Retrieves information regarding requested guardian devicesmobileApi.getTeszekRegistration();- Returns:
Promise<TeszekRegistrationDto>
- Returns:
getTimeTableWeeks– Retrieves timetable week entriesmobileApi.getTimeTableWeeks({ startDate: 'YYYY-MM-DD', endDate: 'YYYY-MM-DD', });Params:
startDate– Start datestringendDate– End datestring
Returns:
Promise<Array<TimeTableWeekDto>>
getInstitution– Retrieves information about the institutionmobileApi.getInstitution();- Returns:
Promise<InstitutionDto>
- Returns:
getDailyNotificationSummary– Retrieves a summary of daily notificationsmobileApi.getDailyNotificationSummary();- Returns:
Promise<DailyNotificationSummaryDto>
- Returns:
getGuardianIsLegalRepresentative– Checks if the guardian is a legal representativemobileApi.getGuardianIsLegalRepresentative();- Returns:
Promise<boolean>
- Returns:
postBankAccountNumber– Posts student's bank account numbermobileApi.postBankAccountNumber({ BankszamlaSzam: '', BankszamlaTulajdonosNeve: '', BankszamlaTulajdonosTipusId: 0, SzamlavezetoBank: '', });Params:
BankszamlaSzam– Bank account numberstringBankszamlaTulajdonosNeve– Bank account owner's namestringBankszamlaTulajdonosTipusId– Bank account owner's type identifiernumberSzamlavezetoBank– Bank namestring
Returns:
Promise<void>
postContact– Posts contact information for the student or guardianmobileApi.postContact('', '');Args:
email– Email addressstringphoneNumber– Phone numberstring
Returns:
Promise<void>
postCovidReport– Reports a COVID infectionmobileApi.postCovidReport();- Returns:
Promise<void>
- Returns:
postReservation– Registers for a scheduled consultation hourmobileApi.postReservation('');Args:
uid– Consultation hour unique identifierstring
Returns:
Promise<void>
postTeszekRegistration– Posts required data for guardian device requestsmobileApi.postTeszekRegistration({ SzuletesiDatum: 'YYYY-MM-DD', Utonev: '', SzuletesiUtonev: '', IsElfogadottAszf: true, AnyjaUtonev: '', AnyjaVezeteknev: '', Elotag: '', SzuletesiHely: '', Vezeteknev: '', SzuletesiVezeteknev: '', });Params:
SzuletesiDatum– Birth dateDateUtonev– Last namestringSzuletesiUtonev– Birth last namestringIsElfogadottAszf– Is accepted ASZFbooleanAnyjaUtonev– Mother's last namestringAnyjaVezeteknev– Mother's first namestringElotag– PrefixstringSzuletesiHely– Birth placestringVezeteknev– First namestringSzuletesiVezeteknev– Birth first namestring
Returns:
Promise<void>
updateGuardian4T– Updates guardian 4T datamobileApi.updateGuardian4T({ SzuletesiDatum: 'YYYY-MM-DD', Utonev: '', SzuletesiUtonev: '', IsElfogadottAszf: true, AnyjaUtonev: '', AnyjaVezeteknev: '', Elotag: '', SzuletesiHely: '', Vezeteknev: '', SzuletesiVezeteknev: '', });Params:
SzuletesiDatum– Birth dateDateUtonev– Last namestringSzuletesiUtonev– Birth last namestringIsElfogadottAszf– Is accepted ASZFbooleanAnyjaUtonev– Mother's last namestringAnyjaVezeteknev– Mother's first namestringElotag– PrefixstringSzuletesiHely– Birth placestringVezeteknev– First namestringSzuletesiVezeteknev– Birth first namestring
Returns:
Promise<void>
updateLepEventPermission– Updates permission for Lázár Ervin Program eventsmobileApi.updateLepEventPermission({ EloadasId: 0, Dontes: true, });Params:
EloadasId– Lecture identifiernumberDontes– Decision (optional)boolean
Returns:
Promise<void>
EAdminApiV1
createAttachment– Creates an attachmenteAdminApi.createAttachment(Buffer.from(''));Args:
part– Attachment dataBuffer | string
Returns:
Promise<TemporaryFileDto>
createRectification– Creates a rectificationeAdminApi.createRectification('', { azonosito: '', tipus: {}, tipusKod: '', csatolmanyok: [], statusz: {}, });Args:
ugyId– Case unique identifierstringbody– Rectification dataRectificationPost
Params
body:azonosito– Identifierstringtipus– TypeTypetipusKod– Type codestringcsatolmanyok– AttachmentsArray<OtherThingsToDoAttachments>statusz– StatusState
Returns:
Promise<any>
createTmgiCase– Creates a TMGI caseeAdminApi.createTmgiCase({ igazolasTipus: {}, tanuloOsztaly: '', igazoltTavolletVegeDatum: 'YYYY-MM-DD', kerelemKotelezoDokumentumLista: [], csatolmanyok: [], igazoltTavolletKezdeteDatum: 'YYYY-MM-DD', tanuloCsaladiNev: '', tanuloKeresztNev: '', tipus: {}, tipusKod: '', });Params:
igazolasTipus– Confirmation typeTypetanuloOsztaly– Student classstringigazoltTavolletVegeDatum– End date of the justified absenceDatekerelemKotelezoDokumentumLista– List of mandatory documentsArray<ApplicationMandatoryDocument>csatolmanyok– AttachmentsArray<OtherThingsToDoAttachments>igazoltTavolletKezdeteDatum– Start date of the justified absenceDatetanuloCsaladiNev– Student's last namestringtanuloKeresztNev– Student's first namestringtipus– TypeTypetipusKod– Type codestring
Returns:
Promise<any>
deleteMessagePermanently– Deletes a message permanentlyeAdminApi.deleteMessagePermanently([''], true);Args:
postaladaElemAzonositok– Mailbox item unique identifiersArray<number | string>isKuka– Is trash (optional)boolean
Returns:
Promise<any>
getAccessControlSystemEvents– Retrieves access control system eventseAdminApi.getAccessControlSystemEvents();getAddressableClasses– Retrieves addressable classeseAdminApi.getAddressableClasses('');Args:
cimzettKod– Recipient codestring
Returns:
Promise<Array<KretaClassDto>
getAddressableGuardiansForClass– Retrieves addressable guardians for a classeAdminApi.getAddressableGuardiansForClass('');Args:
osztalyKretaAzonosito– Class unique identifiernumber | string
Returns:
Promise<Array<GuardianEAdminDto>
getAddressableSzmkRepesentative– Retrieves addressable SZMK representativeeAdminApi.getAddressableSzmkRepesentative();- Returns:
Promise<Array<GuardianEAdminDto>
- Returns:
getAddressableType– Retrieves addressable typeeAdminApi.getAddressableType();- Returns:
Promise<Array<AddresseeTypeDto>
- Returns:
getAddresseeType– Retrieves addressee typeeAdminApi.getAddresseeType();- Returns:
Promise<Array<AddresseeTypeDto>
- Returns:
getAdministrators– Retrieves administratorseAdminApi.getAdministrators();- Returns:
Promise<Array<EmployeeDetailsDto>
- Returns:
getCase– Retrieves a caseeAdminApi.getCase('');Args:
ugyId– Case unique identifierstring
Returns:
Promise<CaseDto>
getCaseTypes– Retrieves case typeseAdminApi.getCaseTypes();- Returns:
Promise<Array<TypeDto>
- Returns:
getCases– Retrieves caseseAdminApi.getCases(true);Args:
isLezartakIs– Is closed (optional)boolean
Returns:
Promise<Array<CaseDto>
getChildData– Retrieves child dataeAdminApi.getChildData();- Returns:
Promise<ChildDto>
- Returns:
getClassMasters– Retrieves class masterseAdminApi.getClassMasters();- Returns:
Promise<Array<EmployeeDetailsDto>
- Returns:
getCurrentInstitutionDetails– Retrieves current institution detailseAdminApi.getCurrentInstitutionDetails();getCurrentInstitutionModules– Retrieves current institution moduleseAdminApi.getCurrentInstitutionModules();- Returns:
Promise<Array<string>
- Returns:
getDirectors– Retrieves directorseAdminApi.getDirectors();- Returns:
Promise<Array<EmployeeDetailsDto>
- Returns:
getMessage– Retrieves a messageeAdminApi.getMessage('');Args:
azonosito– Message unique identifiernumber | string
Returns:
Promise<MailboxItemDto>
getMessageLimitations– Retrieves message limitationseAdminApi.getMessageLimitations();- Returns:
Promise<MessageLimitationsDto>
- Returns:
getMessages– Retrieves messageseAdminApi.getMessages();- Returns:
Promise<Array<MailboxItemDto>
- Returns:
getSigner– Retrieves a signereAdminApi.getSigner('', '');Args:
kerelemAzonosito– Request unique identifiernumber | stringkretaAzonosito– Kreta identifiernumber | string
Returns:
Promise<SignerDto>
getStatus– Retrieves statuseAdminApi.getStatus();- Returns:
Promise<StatusDto>
- Returns:
getSzmk– Retrieves SZMKeAdminApi.getSzmk();- Returns:
Promise<Array<GuardianDto>
- Returns:
getTeachers– Retrieves teacherseAdminApi.getTeachers();- Returns:
Promise<Array<EmployeeDetailsDto>
- Returns:
getTmgiCaseTypes– Retrieves TMGI case typeseAdminApi.getTmgiCaseTypes();- Returns:
Promise<Array<TypeDto>
- Returns:
getUnreadMessagesCount– Retrieves unread messages counteAdminApi.getUnreadMessagesCount();- Returns:
Promise<number>
- Returns:
readMessage– Reads a messageeAdminApi.readMessage({ postaladaElemAzonositok: [], isKuka: true, });Args:
body– Read message request fieldsReadMessageRequest
Params:
postaladaElemAzonositok– Mailbox item unique identifiersArray<number>isKuka– Is trashboolean
Returns:
Promise<any>
sendMessage– Sends a messageeAdminApi.sendMessage({ cimzettLista: [], csatolmanyok: [], azonosito: 0, feladoNev: '', feladoTitulus: '', kuldesDatum: new Date(), targy: '', szoveg: '', elozoUzenetAzonosito: 0, });Args:
body– Message fieldsMessage
Params
body:cimzettLista– Recipient listArray<AddresseeDto>csatolmanyok– AttachmentsArray<AttachmentDto>azonosito– IdentifiernumberfeladoNev– Sender namestringfeladoTitulus– Sender titlestringkuldesDatum– Sending dateDatetargy– Subjectstringszoveg– TextstringelozoUzenetAzonosito– Previous message identifiernumber
Returns:
Promise<any>
sendMessageToBin– Sends a message to the bineAdminApi.sendMessageToBin({ isKuka: true, postaladaElemAzonositoLista: [], });Args:
body– Send message to bin request fieldsSendMessageToBinRequest
Params
body:isKuka– Is trashbooleanpostaladaElemAzonositoLista– Mailbox item unique identifiersArray<number>
Returns:
Promise<any>
NaploApiV3
getEvaluationMode– Retrieves evaluation modenaploApi.getEvaluationMode('');Args:
enumTipus– Enum typestring
Returns:
Promise<Array<EvaluationModeDto>>
getHomework– Retrieves homeworknaploApi.getHomework('');Args:
uid– Homework unique identifierstring | number
Returns:
Promise<HomeworkGetDto>
postHomework– Posts homeworknaploApi.postHomework({ OsztalyCsoportId: 0, HataridoDatuma: 'YYYY-MM-DD', Szoveg: '', OraDatum: 'YYYY-MM-DD', TantargyId: 0, });Args:
body– Homework fieldsHomeworkPostFields
Params
body:OsztalyCsoportId– Class group identifiernumberHataridoDatuma– Deadline dateDateSzoveg– TextstringOraDatum– Hour dateDateTantargyId– Subject identifiernumber
Returns:
Promise<number>
putHomework– Updates homeworknaploApi.putHomework('', { HataridoDatuma: 'YYYY-MM-DD', Szoveg: '', });Args:
uid– Homework unique identifierstring | numberbody– Homework fieldsHomeworkPutFields
Params
body:HataridoDatuma– Deadline dateDateSzoveg– Textstring
Returns:
Promise<void>
deleteHomework– Deletes homeworknaploApi.deleteHomework('');Args:
uid– Homework unique identifierstring | number
Returns:
Promise<void>
deleteHomeworkAttachment– Deletes homework attachmentnaploApi.deleteHomeworkAttachment('');Args:
uid– Homework unique identifierstring | number
Returns:
Promise<void>
getJustification– Retrieves justificationnaploApi.getJustification('');Args:
tanuloId– Student identifiernumber | string
Returns:
Promise<JustificationDto>
postJustification– Posts justificationnaploApi.postJustification({ TanuloId: 0, OsztalyCsoportId: 0, IgazolasKezdete: 'YYYY-MM-DD', IgazolasVege: 'YYYY-MM-DD', IgazolasTipus: '', IgazolasMegjegyzes: '', });Args:
body– Justification fieldsJustificationPostFields
Params
body:TanuloId– Student identifiernumberOsztalyCsoportId– Class group identifiernumberIgazolasKezdete– Justification start dateDateIgazolasVege– Justification end dateDateIgazolasTipus– Justification typestringIgazolasMegjegyzes– Justification commentstring
Returns:
Promise<void>
deleteJustification– Deletes justificationnaploApi.deleteJustification('');Args:
uid– Justification unique identifierstring
Returns:
Promise<void>
getSchoolGuard– Retrieves school guardnaploApi.getSchoolGuard();- Returns:
Promise<Array<SchoolGuardDto>
- Returns:
getNotes– Retrieves notesnaploApi.getNotes();- Returns:
Promise<Array<StudentNotesDto>
- Returns:
getTimetable– Retrieves timetablenaploApi.getTimetable({ datumTol: 'YYYY-MM-DD', datumIg: 'YYYY-MM-DD', });Args:
df– Timetable date filterDateFilter
Params
df:orarendElemKezdoNapDatuma– Timetable start dateDateorarendElemVegNapDatuma– Timetable end dateDate
Returns:
Promise<Array<TimetableElementDto>
getTimetableElement– Retrieves timetable elementnaploApi.getTimetableElement('');Args:
orarendElemUid– Timetable element unique identifierstring
Returns:
Promise<TimetableElementDto>
getTimetableWeeks– Retrieves timetable weeksnaploApi.getTimetableWeeks({ orarendElemKezdoNapDatuma: 'YYYY-MM-DD', orarendElemVegNapDatuma: 'YYYY-MM-DD', });Args:
df– Timetable date filterTimeTableDateFilter
Params
df:orarendElemKezdoNapDatuma– Timetable start dateDateorarendElemVegNapDatuma– Timetable end dateDateReturns:
Promise<Array<TimetableWeekDto>
postLogging– Posts loggingnaploApi.postLogging({ IsElmaradt: true, TanuloLista: [], OrarendElemUid: '', Tema: '', });Args:
body– Logging fieldsLessonLoggingRequestFields
Params
body:IsElmaradt– Is missedbooleanTanuloLista– Student listArray<StudentDataForLoggingRequestDto>OrarendElemUid– Timetable element unique identifierstringTema– Topicstring
Returns:
Promise<string>
deleteLogging– Deletes loggingnaploApi.deleteLogging('');Args:
orarendElemUid– Timetable element unique identifierstring
Returns:
Promise<TimetableElementDto>
getStudentPresence– Retrieves student presencenaploApi.getStudentPresence('');Args:
orarendElemUid– Timetable element unique identifierstring
Returns:
Promise<Array<StudentPresenceDto>
getAnnouncedTests– Retrieves announced testsnaploApi.getAnnouncedTests('', '');Args:
osztalyCsoportId– Class group identifiernumber | stringdatum– DateDate | string | number
Returns:
Promise<Array<AnnouncedTestDto>
getAnnouncedTest– Retrieves announced testnaploApi.getAnnouncedTest('');Args:
uid– Announced test unique identifiernumber | string
Returns:
Promise<AnnouncedTestDto>
deleteAnnouncedTest– Deletes announced testnaploApi.deleteAnnouncedTest('');Args:
uid– Announced test unique identifiernumber | string
Returns:
Promise<void>
postAnnouncedTest– Posts announced testnaploApi.postAnnouncedTest({ ErtekelesMod: 0, ForceSave: true, OrarendElemUid: '', Tema: '', });Args:
body– Announced test fieldsAnnouncedTestRequestFields
Params
body:ErtekelesMod– Evaluation modenumberForceSave– Force savebooleanOrarendElemUid– Timetable element unique identifierstringTema– Topicstring
Returns:
Promise<AnnouncedTestDto>
getStudentEvaluations– Retrieves student evaluationsnaploApi.getStudentEvaluations('', '', { datum: 'YYYY-MM-DD', tanuloId: 0, });Args:
tantargyId– Subject identifiernumber | stringosztalyCsoportId– Class group identifiernumber | stringops– Options{ datum?: Date | string | number, tanuloId?: number | string }
Params
ops:datum– DateDate | string | numbertanuloId– Student identifier (optional)number | string
Returns:
Promise<Array<StudentEvaluationDto>
postClassGroupEvaluations– Posts class group evaluationsnaploApi.postClassGroupEvaluations([]);Args:
body– Class group evaluations fieldsArray<StudentEvaluationFields>
Returns:
Promise<Array<StudentEvaluationDto>
getSentenceBankItems– Retrieves sentence bank itemsnaploApi.getSentenceBankItems('', '');Args:
tantargyId– Subject identifiernumber | stringosztalyCsoportId– Class group identifiernumber | string
Returns:
Promise<Array<SentenceBankItemDto>
getStudents– Retrieves studentsnaploApi.getStudents('', '');Args:
osztalyCsoportId– Class group identifiernumber | stringdatum– DateDate | string | number
Returns:
Promise<Array<StudentDto>
getStudent– Retrieves studentnaploApi.getStudent('');Args:
uid– Student unique identifiernumber | string
Returns:
Promise<ClassGroupStudentDto>
getClassGroups– Retrieves class groupsnaploApi.getClassGroups();- Returns:
Promise<Array<ClassGroupDto>
- Returns:
getEvaluations– Retrieves evaluationsnaploApi.getEvaluations('', '', '');Args:
tanuloId– Student identifiernumber | stringtantargyId– Subject identifiernumber | stringosztalyCsoportId– Class group identifiernumber | string
Returns:
Promise<Array<EvaluationDto>
updateEvaluation– Updates evaluationnaploApi.updateEvaluation('', { ErtekelesDatum: new Date(), ErtekelesOsztalyzatId: 0, ErtekelesSzazalek: 0, ErtekelesSzoveg: '', ErtekelesModId: 0, ErtekelesTema: '', });Args:
uid– Evaluation unique identifiernumber | stringbody– Evaluation fieldsEvaluationUpdateRequestFields
Params
body:ErtekelesDatum– Evaluation dateDateErtekelesOsztalyzatId– Evaluation grade identifier (optional)numberErtekelesSzazalek– Evaluation percentage (optional)numberErtekelesSzoveg– Evaluation text (optional)stringErtekelesModId– Evaluation mode identifiernumberErtekelesTema– Evaluation topicstring
Returns:
Promise<EvaluationDto>
deleteEvaluation– Deletes evaluationnaploApi.deleteEvaluation('');Args:
uid– Evaluation unique identifiernumber | string
Returns:
Promise<void>
getProfile– Retrieves profilenaploApi.getProfile();- Returns:
Promise<TeacherProfileDto>
- Returns:
getSettings– Retrieves settingsnaploApi.getSettings();- Returns:
Promise<TeacherSettingsDto>
- Returns:
postSettings– Posts settingsnaploApi.postSettings({ ElozoOranHianyzoAjanlasa: true, });Args:
body– Settings fieldsTeacherSettingsRequestFields
Params
body:ElozoOranHianyzoAjanlasa– Previous lesson missing recommendationboolean
Returns:
Promise<void>
getSubjectDivision– Retrieves subject divisionnaploApi.getSubjectDivision();- Returns:
Promise<Array<SubjectDivisionDto>
- Returns:
getSyllabus– Retrieves syllabusnaploApi.getSyllabus('', '', '');Args:
tantargyId– Subject identifiernumber | stringosztalyCsoportId– Class group identifiernumber | stringtanarUid– Teacher unique identifierstring
Returns:
Promise<Array<SyllabusItemDto>
License
Issues
If you find a bug, please file an issue on the issue tracker.
Contributing
Feel free to contribute to this project. Any kind of help is appreciated!
