Skip to content

Commit

Permalink
release: 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
star0202 committed Apr 5, 2023
1 parent c111cbf commit be2dfda
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 10 deletions.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# neis.ts

![License](https://img.shields.io/github/license/star0202/neis.ts?style=flat-square)

NEIS Open API를 쉽게 사용하기 위한 TypeScript API Wrapper입니다.

## Installation

```bash
npm install neis.ts
# or
yarn add neis.ts
# or
pnpm add neis.ts
```

## Optional Dependencies

- [tslog](https://www.npmjs.com/package/tslog) (로깅)

## Usage

```ts
import { Neis } from 'neis.ts';
import { Logger } from 'tslog'; // Optional

const logger = new Logger() // Optional
const neis = new Neis({
// NeisConfig 참고
KEY: 'API KEY',
Type: 'json',
pIndex: 1,
pSize: 100,
logger: logger, // Optional
})

;(async () => {
const school = await neis.getSchoolOne({
// SchoolRequestParams 참고
ATPT_OFCDC_SC_CODE: '시도교육청코드',
SD_SCHUL_CODE: '표준학교코드',
})
const meal = await school.getMealOne({
// MealRequestParams 참고
MLSV_YMD: 'yyyymmdd',
})

console.log(school)
console.log(meal)
})()
```

## Official API Docs by NEIS

- [교육정보 공공데이터포털](https://www.data.go.kr/data/15012690/openapi.do)
27 changes: 20 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"type": "git",
"url": "https://github.com/star0202/neis.ts"
},
"author": "Starcea",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Starcea <[email protected]>",
"license": "MIT",
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
Expand All @@ -20,15 +22,26 @@
"jest": "^29.5.0",
"prettier": "^2.8.7",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1"
},
"scripts":{
"lint": "eslint src --ignore-path .gitignore",
"test": "jest"
"ts-node": "^10.9.1",
"typescript": "^5.0.3"
},
"dependencies": {
"axios": "^1.3.4",
"axios": "^1.3.4"
},
"optionalDependencies": {
"tslog": "^4.8.2"
},
"keywords": [
"neis",
"api",
"wrapper",
"typescript",
"korean"
],
"scripts": {
"lint": "eslint src --ignore-path .gitignore",
"test": "jest",
"build": "tsc"
},
"packageManager": "[email protected]"
}
12 changes: 9 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit be2dfda

Please sign in to comment.