0.0.4 • Published 3 years ago

houjinbangou-api v0.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

houjinbangou-api

Build Status

国税庁法人番号システムWeb-APIのTypeScriptラッパーライブラリです。

English: README-en.md

インストール

Node.js

npm i houjinbangou-api

使用方法

ドキュメント:https://totechite.github.io/houjinbangou-api-wrapper/index.html

サービスの利用にアプリケーションIDが必要です。持っていない場合は以下のフォームより発行手続きを進めてください。
https://www.houjin-bangou.nta.go.jp/webapi/riyo-todokede/

以下は各サービスにアクセスするコード例です。

import { HoujinBangou } from "houjinbangou-api"

const APPLICATION_ID: string = "XXXXXXXXXX"
const HB = new HoujinBangou(APPLICATION_ID)

/* Request endpoints */
async function(){

    // /num
    let response_num = await HB.num({number: "5050005005266", type: "02"})

    // /diff
    let response_diff = await HB.diff({from: "2019-06-25", to: "2019-06-25", type: "02"})

    // /name 
    let response_name = await HB.name({ name: "大学", type: "02", mode: "2" })

}

LICENSE

MIT license
http://opensource.org/licenses/mit-license.php