@abhinavmir/corona 中文文档教程
Introduction
该模块从 JHU 的数据库中获取数据并返回它作为一个承诺。
Functions
导入
var coronajs = require("@abhinavmir/corona")
获取所有数据
coronajs.baseFetch()
获取最新的全球数据
coronajs.latestFetch()
按国家名称获取数据
coronajs.fetchCountryByCode(countryCode)
注意:国家代码符合 ISO 3166-1 alpha-2 标准
按国家/地区代码获取数据
coronajs.fetchCountryByName(countryName)
Acknowledgements
该模块使用以下 API: https://coronavirus-tracker-api.herokuapp.com/#/
Introduction
The Module fetches data from JHU's Database and returns it as a Promise.
Functions
To import
var coronajs = require("@abhinavmir/corona")
Fetch All Data
coronajs.baseFetch()
Fetch Latest Worldwide data
coronajs.latestFetch()
Fetch Data By Country Name
coronajs.fetchCountryByCode(countryCode)
Note: The Country Code is by ISO 3166-1 alpha-2 standards
Fetch Data by Country Code
coronajs.fetchCountryByName(countryName)
Acknowledgements
The module uses the following API(s): https://coronavirus-tracker-api.herokuapp.com/#/