🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

jmaapi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jmaapi

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

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 11 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts