jmaapi
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

JMAAPI

API Client to fetch data from https://www.jma.go.jp/jma/index.html.

Installation

yarn add jmaaapi or npm install jmaapi

Example

import { JmaApi } from "jmaapi";

const api = new JmaApi();

(async () => {
  const area = await api.getArea();
  const tokyoCode = Object.entries(area.offices)
    .filter(([_, center]) => center.name.includes("東京都"))
    .map(([code, _]) => code)[0];

  const data = await api.getForecast("offices", tokyoCode);

  console.log(JSON.stringify(data));
})();

Usage

See comments in ./src/api/index.ts and type declarations.

Readme

Keywords

none

Package Sidebar

Install

npm i jmaapi

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

34.5 kB

Total Files

11

Last publish

Collaborators

  • penpenpng