postcodesoftware
v0.1.0
Published
Node.js interface to PostcodeSoftware.net
Downloads
2
Maintainers
Readme
postcodesoftware
Node.js interface to PostcodeSoftware.net
Introduction
PostcodeSoftware is an asynchronous javascript client for PostcodeSoftware.net.
Synopsis
var assert = require('assert'); // For our demo here
var PostcodeSoftware = require('postcodesoftware');
var ps = new PostcodeSoftware({account: "test", password: "test"});
ps.lookup('LS18 5NJ', function (err, res) {
res.address1; // 'Cornmill View'
assert.equal(res.postcode, 'LS18 5NJ');
});
ps.credits(function (err, res) {
if (err) {
// Handle error
} else {
// Handle success
}
});
Installation
$ npm install postcodesoftware
Testing
After cloning the repository and installing the dependencies, you can run all the tests using Mocha.
$ npm test
or
$ mocha test/tests.js