1.0.0 • Published 10 years ago
sepomex-js v1.0.0
#Sepomex JS library v1.0.0
sepomex-js is a client wrapper which communicates with the SEPOMEX API, and interact with it.
Table of contents
Quick start
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
.
Usage
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"})
Available parameters
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.
Bug tracker & feature request
Have a bug or a feature request? Please open a new issue. Before opening any issue, please search for existing issues.
Contributing
Please submit all pull requests against a separate branch. Please follow the standard for naming the variables, mixins, etc.
Heroes
Abraham Kuri
License
Code and documentation copyright 2015 Icalia Labs. Code released under the MIT license.
1.0.0
10 years ago