gleisonnanet/cidades-gratis

使用此包,您可以免费在IBGE网站上查询城市。

v1.0.0 2015-08-20 21:55 UTC

This package is auto-updated.

Last update: 2024-09-27 03:59:07 UTC


README

[![最新稳定版本](https://poser.pugx.org/composer require gleisonnanet/cidades-gratis/cidades-gratis/v/stable.svg)](https://packagist.org.cn/packages/composer require gleisonnanet/cidades-gratis/cidades-gratis) [![总下载量](https://poser.pugx.org/composer require gleisonnanet/cidades-gratis/cidades-gratis/downloads.svg)](https://packagist.org.cn/packages/composer require gleisonnanet/cidades-gratis/cidades-gratis) [![最新不稳定版本](https://poser.pugx.org/composer require gleisonnanet/cidades-gratis/cidades-gratis/v/unstable.svg)](https://packagist.org.cn/packages/composer require gleisonnanet/cidades-gratis/cidades-gratis) ![MIT许可证](https://poser.pugx.org/composer require gleisonnanet/cidades-gratis/nfephp-serialize/license.svg)

使用此包,您可以免费在IBGE网站上查询城市。

如何使用

添加库

$ composer require composer require gleisonnanet/cidades-gratis/cidades-gratis

将composer的autoload.php文件添加到您的PHP文件中。

require_once 'vendor/autoload.php';  

方法

查找州

使用方法getUfs()来返回包含各自代码的州列表

$ufs = composer require gleisonnanet/cidades-gratis\CidadesGratis\Cidades::getUfs();
查找城市

使用方法getCidades()来返回特定州中包含各自代码的城市列表

$cidades = composer require gleisonnanet/cidades-gratis\CidadesGratis\Cidades::getCidades(31);
查找城市详情

使用方法getCidadeDetalhes()来返回特定城市的详细信息

$detalhes = composer require gleisonnanet/cidades-gratis\CidadesGratis\Cidades::getCidadeDetalhes(310620);

构建

在build/文件夹中存在两个文件:ufs.json和cidades.json。它们是在2015年8月20日生成的

喜欢吗?也了解一下

许可证

MIT许可证(MIT)