2017 © Pedro Peláez
 

library via-cep-sdk

Biblioteca de integração com viaCep

image

esilvajr/via-cep-sdk

Biblioteca de integração com viaCep

  • Friday, November 3, 2017
  • by esilvajr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Installation

composer require esilvajr/via-cep-sdk

How to use

Search using zipcode
$viaCep = new \ViaCep\ViaCep();
$address = $viaCep->ZipCode('13566590')
                  ->find(new \ViaCep\Requests\Json());
return $address->toArray();

Search using address
$viaCep = new \ViaCep\ViaCep();
$addresses = $viaCep->Address('SP', 'São Carlos', 'Carlos Botelho')
                    ->find(new \ViaCep\Requests\Json());
return $address->toArray();

Dev

Exceptions
AddressNotFoundException: {
    "code": 404,
    'Message: "Addresses not found. Try again with a different one."
}

InvalidZipCodeFormatException: {
    "code": 400,
    'Message: "ZipCode must be a string that contains only number. See: https://viacep.com.br/ in Validação do Cep sector."
}

The Versions

03/11 2017

dev-master

9999999-dev

Biblioteca de integração com viaCep

  Sources   Download

The Requires

 

by Edison Silva Jr | esilvajr@hotmail.com

03/11 2017

0.1.0beta

0.1.0.0-beta

Biblioteca de integração com viaCep

  Sources   Download

The Requires

 

by Edison Silva Jr | esilvajr@hotmail.com