webmaniabr-correios 1.0.0

Search addresses for Brazilian ZIP codes with the WebmaniaBR REST API

Released 2017-03-02.

To install, run:

haxelib install webmaniabr-correios 1.0.0

See using Haxelib in Haxelib documentation for more information.

Maintainerprotocubo
Websitehttps://github.com/protocubo/webmaniabr-correios.hx
Current version1.0.0
StatisticsInstalled 1 times
LicenseBSD
Tags cross

README.md

webmaniabr-correios.hx

Search addresses for Brazilian ZIP codes – known locally as CEPs – with the WebmaniaBR REST API.

Usage

var api = new Correios(appKey, appSecret);
api.queryCep("80540-180", function (res) {
	switch res {
	case Some(address):  // zip code exists
		trace(address);
	case None:           // zip code doesn't exist
		trace("unkown cep");
	case Failure(err):   // api failure
		trace('api error: $err');
	}
});
{ endereco: "Avenida Anita Garibaldi", bairro: "Ahú", cidade: "Curitiba", uf: "PR", cep: "80540-180" }