【文件属性】:
文件名称:rest-countries-node:围绕https:restcountries.eu提供的API的Node.js包装器库
文件大小:32KB
文件格式:ZIP
更新时间:2021-02-12 04:13:27
nodejs restcountries JavaScript
休息国家节点
由提供的API周围的Node.js包装器库。
可用方法
用法
var RestCountries = require ( 'rest-countries-node' ) ;
restCountries = new RestCountries ;
得到所有
返回所有国家的信息:
restCountries . getAll ( )
. then ( response => {
/*...*/
} ) ;
findByName
按国家名称搜索。 它可以是本地名称或部分名称:
restCountries . findByName ( 'france' )
. then ( response => {
/*
[
{
"alpha2Code": "FR",
"alpha3Code
【文件预览】:
rest-countries-node-master
----index.js(49B)
----package.json(519B)
----test()
--------mock()
--------index.test.js(13KB)
----LICENSE(1KB)
----package-lock.json(50KB)
----.gitignore(467B)
----lib()
--------RestCountries.js(5KB)
----README.md(10KB)