Kotlin + Ktor 기반 NEIS(교육청) API 클라이언트 라이브러리
- 코루틴 기반 비동기 API
- 간단한 Client 호출 구조
- DTO → Domain 자동 변환
- Kotlin 친화적 DSL API 설계
- 시간표 누락 교시 자동 채우기
- 날짜 / 학년 / 반 / 급식 타입 등 다양한 조회 지원
repositories {
maven { url = uri("https://jitpack.io") }
}
dependencies {
implementation("com.github.mrjimin:Keis:1.0.2")
}suspend fun main() {
val client = KeisClient("YOUR_API_KEY")
// 학교 컨텍스트 생성
val context = client.schoolContext("우석고") ?: return
// Meal
val lunch = context.meal(MealType.LUNCH) {
today()
}
// Timetable
val timetable = context.timetable {
grade(2)
classNumber(3)
fillMissing(true)
}
// Schedule
val schedules = context.schedule()
}👉 자세한 사용법은 아래 API 또는 Example을 참고하세요.
🏫 School
client.school("학교명"): School?
client.schools("학교명"): List<School>context.timetable {
grade(1)
classNumber(2)
fillMissing()
dateRange(from, to)
}🍽️ Meal
context.meal(MealType.LUNCH) {
today()
}
context.meal(MealType.ALL) {
thisWeek()
}📅 Schedule
context.schedule {
today()
dateRange(from, to)
dayNightCourse(DayNightCourse.DAY)
schoolCourse(SchoolCourse.GENERAL)
}- NEIS Open API: https://open.neis.go.kr
- Other implementations:
Keis는 누구나 기여할 수 있습니다! 🎉
- 이 레포지토리를 Fork 합니다.
- 새로운 브랜치를 생성합니다.
- 코드를 수정합니다.
- Pull Request를 생성합니다.
- Kotlin 스타일 가이드를 따릅니다.
- 불필요한 null 사용을 지양합니다.
- Domain / DTO 분리를 유지합니다.
- 작은 수정도 환영합니다 🙌
- 문서 개선도 훌륭한 기여입니다!