protocubo / webmaniabr-correios.hx

Query addresses for Brazilian ZIP codes (CEPs) in Haxe, using the WebmaniaBR REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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" }

About

Query addresses for Brazilian ZIP codes (CEPs) in Haxe, using the WebmaniaBR REST API

License:BSD 2-Clause "Simplified" License


Languages

Language:Haxe 86.1%Language:Makefile 13.9%