0.1.0 • Published 9 years ago

postcodesoftware v0.1.0

Weekly downloads
4
License
-
Repository
-
Last release
9 years ago

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