Giter VIP home page Giter VIP logo

neis.ts's Introduction

neis.ts

License

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

모든 엔드포인트가 래핑되어 있습니다.

설치

npm install neis.ts  # npm
yarn add neis.ts  # yarn
pnpm add neis.ts  # pnpm

선택적 종속성

사용법

import Neis from 'neis.ts'
import { Logger } from 'tslog'

const neis = new Neis({
  key: 'API KEY',
  logger: new Logger(),
})

neis
  .getSchool({
    ATPT_OFCDC_SC_CODE: '시도교육청코드',
    SD_SCHUL_CODE: '표준학교코드',
  })
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.error(err)
  })

NEIS 공식 API 문서

neis.ts's People

Contributors

andjsrk avatar renovate[bot] avatar star0202 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

andjsrk

neis.ts's Issues

The automated release is failing 🚨

🚨 The automated release from the stable branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the stable branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Cannot push to the Git repository.

semantic-release cannot push the version tag to the branch stable on the remote Git repository with URL https://x-access-token:[secure]@github.com/star0202/neis.ts.

This can be caused by:


Good luck with your project ✨

Your semantic-release bot 📦🚀

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency rimraf to v5.0.7
  • chore(deps): update dependency eslint to v8.57.0
  • chore(deps): update dependency eslint-config-prettier to v8.10.0
  • chore(deps): update dependency typescript to v5.4.5
  • chore(deps): update typescript-eslint monorepo to v5.62.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency axios to v1.7.1
  • chore(deps): update dependency eslint to v9
  • chore(deps): update pnpm to v9
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
.github/workflows/release.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
npm
package.json
  • axios ^1.3.4
  • @trivago/prettier-plugin-sort-imports ^4.1.1
  • @types/jest ^29.5.0
  • @types/node ^20.0.0
  • @typescript-eslint/eslint-plugin ^5.57.0
  • @typescript-eslint/parser ^5.57.0
  • eslint ^8.37.0
  • eslint-config-prettier ^8.8.0
  • eslint-plugin-prettier ^4.2.1
  • jest ^29.5.0
  • prettier ^2.8.7
  • rimraf ^5.0.0
  • semantic-release ^23.0.0
  • ts-jest ^29.1.0
  • ts-node ^10.9.1
  • typescript ^5.0.3
  • tslog ^4.8.2
  • pnpm 8.15.4

  • Check this box to trigger a request for Renovate to run again on this repository

The requested module 'neis.ts' does not provide an export named 'default'

import Neis from 'neis.ts'
import { Logger } from 'tslog'

const neis = new Neis({
  key: 'API KEY',
  logger: new Logger(),
})

neis
  .getSchool({
    ATPT_OFCDC_SC_CODE: '시도교육청코드',
    SD_SCHUL_CODE: '표준학교코드',
  })
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.error(err)
  })

위 예제를 typescript 환경에서 ts-node를 사용하여 실행한 결과 다음과 같은 오류가 발생했습니다.

스크린샷 2023-10-28 201531

package.json

{
  "type": "module",
  "dependencies": {
    "neis.ts": "^1.3.0"
  },
  "devDependencies": {
    "@types/node": "^20.8.9",
    "typescript": "^5.2.2"
  }
}

tsconfig.json

{
  "compilerOptions": {
    "lib": ["ES6", "DOM"],
    "moduleResolution": "Node",
    "declaration": true,
    "strict": true,
    "target": "ES6",
    "module": "ES6"
  },
  "include": ["src/index.ts"],
  "ts-node": {
    "esm": true
  }
}

왜 이런지 알 수 있을까요?

시간표 가져오기

School의 메서드 getTimetable

  • 초 | 중 | 고 | 특 endpoint, param, row 전부 다름
  • overload를 사용할수도 없음

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.