2.0.1 • Published 4 years ago

@thesold/pcapredict v2.0.1

Weekly downloads
50
License
MIT
Repository
github
Last release
4 years ago

Loqate (Postcode Anywhere / PCA Predict) API Wrapper

A simple API wrapper for the Loqate (Postcode Anywhere / PCA Predict) Service

Authors:

Overview

An unofficial implementation of the Loqate API for modern Javascript to easily lookup addresses from Post Codes or Partial Address details.

Requirements

A Loqate account and API key is required to use this package.

Installation

Add the package to your project

npm install @thesold/pcapredict

Usage

import { Lookup } from '@thesold/pcapredict'

const lookup = new Lookup('API-KEY')

lookup.find('POST CODE').get()
    .then((results) =>
        // results contains an array of addresses found
        lookup.retrieve(results[0]).then((address) => {
            // address contains the full address details for the requested entry
        })
    )
    .catch((error) => {
        // Something went wrong
    })

Please see the official API documentation for details about the data returned.

2.0.1

4 years ago

2.0.0

4 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago