#Sepomex JS library v1.0.0
sepomex-js is a client wrapper which communicates with the SEPOMEX API, and interact with it.
You have three options to install sepomex-js library and start using it:
- Clone the repo:
git clone https://github.com/IcaliaLabs/sepomex-js.git
. - Install via bower:
bower install sepomex-js
. - Install via npm:
npm install sepomex-js
.
You can easily start using the client:
//This call will fetch for zip codes with city 'guadalupe' and state 'nuevo leon'
Sepomex.where({city: "guadalupe", state: "nuevo leon"})
You can send some options to the find method in order to filter the request:
- colony - filter by colony
- city - filter by city
- state - filter by state
- cp - filter by zip code
- callback - A function to call when the request has been success
Here is a quick example:
Sepomex.where(
{
"city": "Guadalupe",
"state": "Nuevo leon",
"colony": "punta contry"
},
function(response){
console.log(response.length)
}
)
Check for the api specification for more documentation on it.
Have a bug or a feature request? Please open a new issue. Before opening any issue, please search for existing issues.
Please submit all pull requests against a separate branch. Please follow the standard for naming the variables, mixins, etc.
Abraham Kuri
Code and documentation copyright 2015 Icalia Labs. Code released under the MIT license.