@hmcts/postcodeinfo-client
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

postcode-info-client-node

API Client wrapper for MoJ Postcode Info API which contains public sector information licensed under the Open Government License v2.0

Build Status
MIT license
Greenkeeper badge

Usage

Authentication

You will need an authentication token ('auth token'). If you're using MoJ DS's Postcode Info server, you can get one by emailing platforms@digital.justice.gov.uk with a brief summary of:

  • who you are
  • what project you're going to be using it on
  • roughly how many lookups you expect to do per day

If you're running your own server, see https://github.com/ministryofjustice/postcodeinfo#auth_tokens for instructions on how to set a token up.

Quick start

$ yarn add @hmcts/postcodeinfo-client

Typescript:

import { PostcodeInfoClient  } from '@hmcts/postcodeinfo-client'

new PostcodeInfoClient('<token here>').lookupPostcode('SN15NB')
  • Javascript -
const PostcodeInfoClient = require('@hmcts/postcodeinfo-client').PostcodeInfoClient

new PostcodeInfoClient('<token here>').lookupPostcode('SN15NB')

Readme

Keywords

none

Package Sidebar

Install

npm i @hmcts/postcodeinfo-client

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • timja
  • andrewwa-kainos
  • bendiggle
  • ellie-harrison
  • adrianc
  • hemantt
  • adamsilver
  • trevorsaint
  • timja-hmcts
  • dharmendrak
  • robertparkinson
  • pragnesh
  • damdun
  • p.jar
  • sabah.irfan
  • jenkins-reform-hmcts