Address Info Getter - Pesquisas de informações de endereços
1.3
2021-11-03 13:43 UTC
Requires
- php: >=5.3.0
- goldbach-algorithms/mask: ^1.3
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- php: >=5.3.0
- goldbach-algorithms/mask: ^1.3
- guzzlehttp/guzzle: ^7.3
README
Goldbach Algorithms Address Info Getter (fondly nicknamed AIG) is a PHP library developed for Symfony to collect address information.
Installation
Use the composer to install:
composer require goldbach-algorithms/aig
Usage
Create an AIG instance and look for the address indicating or not the source of access.
# Add use AIG use GoldbachAlgorithms\AIG\AIG; # create a new AIG $aig = new AIG(); # get address by CEP $aig->getAddressByCep('89566410'); # get address by cep using a specific source $aig->getAddressByCep('89304258', AIG::SOURCE_CORREIOS); $aig->getAddressByCep('89304258', AIG::SOURCE_VIACEP);
Return
Look at an example of a JSON return displaying the source of the information.
{ "zipCode": "89304258", "street": "Rua Pioneiro Arlindo Goldbach", "complement": "", "neighborhood": "Vila Nova", "city": "Mafra", "state": "SC", "source": "Correios" }
License
Copyright © 2021 Goldbach Algorithms