Methods
find(office, schoolName, useAliasopt) → (nullable) {SchoolData}
Returns the best matched school data in the DB with school's office and name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
office |
string | |||
schoolName |
string | |||
useAlias |
string |
<optional> |
true |
Returns:
- Type
- SchoolData
Example
school.find('경기도', '백석고');
// {
// code: 'J100000564',
// office: '경기도',
// officeDomain: 'goe.go',
// name: '백석고등학교'
// }
findAll(office, schoolName, useAliasopt) → (nullable) {Array.<SchoolData>}
Returns all matched school data from DB with school's office and name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
office |
string | |||
schoolName |
string | |||
useAlias |
string |
<optional> |
true |
Returns:
- Type
- Array.<SchoolData>
Example
school.findAll('경기도', '백석고');
// [
// {
// code: 'J100000564',
// office: '경기도',
// officeDomain: 'goe.go',
// name: '백석고등학교'
// },
// {
// code: 'J100005280',
// office: '경기도',
// officeDomain: 'goe.go',
// name: '양주백석고등학교'
// }
// ]
getAll() → {Array.<SchoolData>}
Returns all school data from DB.
Returns:
- Type
- Array.<SchoolData>
Example
school.getAll();
// [
// ...
// { code: 'J100000564',
// office: '경기도',
// officeDomain: 'goe.go',
// name: '백석고등학교' }
// ...
// ]
(async) getComciganData(school) → (nullable) {ComciganData}
Returns the school data from Comcigan server.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData |
Returns:
- Type
- ComciganData
Example
await school.getComciganData(find('경기도', '백석고'));
// ComciganData {}
(async) getInformation(school) → (nullable) {SchoolInformation}
Returns the school information from School Info.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData |
Returns:
- Type
- SchoolInformation
Example
await school.getInformation(find('경기도', '백석고'));
// {
// address: '경기도 고양시 일산동구 강촌로 115',
// area: '경기',
// class: '고',
// office: '경기도교육청',
// phone: '031-901-0506',
// fax: '031-901-0501',
// establishmentDate: '1992-09-08',
// establishmentType: '공립',
// schoolAnniversary: '1992-09-08',
// schoolType: '단설',
// site: 'http://www.baekseok.hs.kr'
// }
(async) getMeal(school, date) → (nullable) {SchoolMeal}
Returns the school daily meal.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData | |
date |
Date |
Returns:
- Type
- SchoolMeal
Example
await school.getMeal(find('경기도', '백석고'), new Date());
// {
// breakfast: null,
// lunch: '보리밥_H\n어묵매운탕_H1.5.6.8.9.13.\n콘치즈떡갈비_H1.2.5.6.10.13.15.16.',
// dinner: null
// }
(async) getMeals(school, date) → (nullable) {Array.<SchoolMeal>}
Returns the school monthly meals.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData | |
date |
Date |
Returns:
- Type
- Array.<SchoolMeal>
Example
await school.getMeals(find('경기도', '백석고'), new Date());
// [
// {
// breakfast: null,
// lunch: '보리밥_H\n어묵매운탕_H1.5.6.8.9.13.\n콘치즈떡갈비_H1.2.5.6.10.13.15.16.',
// dinner: null
// }
// ...
// ]
(async) getSchedule(school, grade, room, date) → (nullable) {SchoolSchedule}
Returns the school daily schedule.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData | |
grade |
number | |
room |
number | |
date |
Date |
Returns:
- Type
- SchoolSchedule
(async) getSchedules(school, grade, room) → (nullable) {Array.<SchoolSchedule>}
Returns the school weekly schedule.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData | |
grade |
namber | |
room |
namber |
Returns:
- Type
- Array.<SchoolSchedule>
(async) getTeachers(school) → (nullable) {Array.<string>}
Returns the school teachers.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData |
Returns:
- Type
- Array.<string>
(async) getTeacherSchedule(school, teacher, date) → (nullable) {SchoolTeacherSchedule}
Returns the school's teacher daily schedule.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData | |
teacher |
string | |
date |
Date |
Returns:
(async) getTeacherSchedules(school, teacher) → (nullable) {Array.<SchoolTeacherSchedule>}
Returns the school's teacher weekly schedule.
Parameters:
Name | Type | Description |
---|---|---|
school |
SchoolData | |
teacher |
string |
Returns:
- Type
- Array.<SchoolTeacherSchedule>
Type Definitions
ComciganData
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
교사수 |
number | |
성명 |
Array.<string> | |
학급수 |
Array.<number> | |
요일별시수 |
Array.<Array.<number>> | |
긴과목명 |
Array.<string> | |
과목명 |
Array.<string> | |
시간표 |
Array.<Array> | |
전일제 |
Array.<number> | |
버젼 |
string | |
동시수업수 |
number | |
담임 |
Array.<Array.<number>> | |
가상학급수 |
Array.<number> | |
특별실수 |
number | |
열람제한일 |
string | |
저장일 |
string | |
학기시작일자 |
string | |
학교명 |
string | |
지역명 |
string | |
학년도 |
number | |
복수교사 |
Array.<string> | |
시작일 |
string | |
일과시간 |
Array.<string> | |
일자자료 |
Array.<Array.<(number|string)>> | |
오늘r |
number | |
학급시간표 |
Array.<Array> | |
교사시간표 |
Array.<Array> |
SchoolData
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
code |
string | |
office |
string | |
officeDomain |
string | |
name |
string |
SchoolInformation
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
address |
string |
<nullable> |
|
area |
string |
<nullable> |
|
class |
string |
<nullable> |
|
office |
string |
<nullable> |
|
phone |
string |
<nullable> |
|
fax |
string |
<nullable> |
|
establishmentDate |
string |
<nullable> |
|
establishmentType |
string |
<nullable> |
|
schoolAnniversary |
string |
<nullable> |
|
schoolType |
string |
<nullable> |
|
site |
string |
<nullable> |
SchoolMeal
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
breakfast |
string |
<nullable> |
|
lunch |
string |
<nullable> |
|
dinner |
string |
<nullable> |
SchoolSchedule
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
subject |
string |
<nullable> |
|
subjectOriginal |
string |
<nullable> |
|
teacher |
string |
<nullable> |
|
isChanged |
boolean |
SchoolTeacherSchedule
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
grade |
number | ||
room |
number | ||
subject |
string |
<nullable> |
|
subjectOriginal |
string |
<nullable> |
|
isChanged |
boolean |