Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@api-types/jma-bosai
Advanced tools
Readme
気象庁防災気象情報API - 気象庁ホームページから防災気象情報を取得するAPI
Using npm:
$ npm install @api-types/jma-bosai @aspida/axios axios
Using Yarn:
$ yarn add @api-types/jma-bosai @aspida/axios axios
utils/apiClient.ts
import api from "@api-types/jma-bosai"
import aspida from '@aspida/axios'
export const apiClient = api(aspida())
参考サイト:https://qiita.com/e_toyoda/items/7a293313a725c4d306c0
utils/himawariClient.ts
import { apiClient } from "./apiClient"
export const himawariClient = apiClient.himawari.data.satimg
index.ts
import { BAND_PROD } from '@api-types/jma-bosai'
import { himawariClient } from "./utils/himawariClient"
;(async () => {
const targetTimes = await himawariClient.targetTimes_fd_json.$get()
console.log(targetTimes) // [{"basetime" : "20210224190000", "validtime" : "20210224190000"}...]
const img = new Image()
img.src = himawariClient
._basetime(targetTimes[0].basetime).fd._validtime(targetTimes[0].validtime)._band_prod(BAND_PROD.VISIBLE)._z(3)._x(7)._y_jpg(3).$path()
document.body.appendChild(img)
})()
baseURL: https://www.jma.go.jp/bosai
/**
* フルディスク画像API
*
* _basetime: 基準時刻 TargetTime['basetime']
* _validtime: 撮影時刻 TargetTime['validtime']
* _band_prod: 画像種別 BAND_PROD
* _z: ズームレベル 3-5
* _x: タイルのX座標
* _y: タイルのY座標
*/
type Methods = {
/** フルディスク画像をJPGで取得 */
get: {
resBody: ArrayBuffer
}
}
/**
* 日本付近画像API
*
* _basetime: 基準時刻 TargetTime['basetime']
* _validtime: 撮影時刻 TargetTime['validtime']
* _band_prod: 画像種別 BAND_PROD
* _x: タイルのX座標
* _y: タイルのY座標
*/
type Methods = {
/** 日本付近画像をJPGで取得 */
get: {
resBody: ArrayBuffer
}
}
/** 撮影時刻API */
type Methods = {
/** 撮影時刻一覧を取得 */
get: {
resBody: TargetTime[]
}
}
/** 日本付近の撮影時刻API */
type Methods = {
/** 日本付近の撮影時刻一覧を取得 */
get: {
resBody: TargetTime[]
}
}
/**
* 降水ナウキャスト画像API
*
* _basetime: 基準時刻 TargetTime['basetime']
* _validtime: 実況時間または予報時刻 TargetTime['validtime']
* _z: ズームレベル 4-10
* _x: タイルのX座標
* _y: タイルのY座標
*/
type Methods = {
/** 降水ナウキャスト画像をJPGで取得 */
get: {
resBody: ArrayBuffer
}
}
/** 降水ナウキャストの実況時刻API */
type Methods = {
/** 降水ナウキャストの実況時刻一覧を取得 */
get: {
resBody: TargetTime[]
}
}
/** 降水ナウキャストの予報時刻API */
type Methods = {
/** 降水ナウキャストの予報時刻一覧を取得 */
get: {
resBody: TargetTime[]
}
}
/** 撮影時刻 */
type TargetTime = {
basetime: string
validtime: string
}
/** 画像種別 */
const BAND_PROD = {
/** 可視画像 */
VISIBLE: 'B13/TBB',
/** 赤外画像 */
INFRARED: 'B03/ALBD',
/** 水蒸気画像 */
WATER_VAPOR: 'B08/TBB',
/** トゥルーカラー再現画像 */
TRUE_COLOR: 'REP/ETC',
/** 雲頂強調画像 */
CLOUD_TOP: 'SND/ETC'
} as const
@api-types/jma-bosai is licensed under a MIT License.
FAQs
気象庁防災気象情報API - 気象庁ホームページから防災気象情報を取得するAPI
The npm package @api-types/jma-bosai receives a total of 4 weekly downloads. As such, @api-types/jma-bosai popularity was classified as not popular.
We found that @api-types/jma-bosai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.