Skip to content

This is a PHP library developed for Symfony to collect address information.

License

Notifications You must be signed in to change notification settings

GoldbachAlgorithms/AIG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIG - Address Info Getter

License: MIT

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

MIT

Copyright © 2021 Goldbach Algorithms

About

This is a PHP library developed for Symfony to collect address information.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages