@thesold/pcapredict
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.10latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.10
2.0.00
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @thesold/pcapredict

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

18.7 kB

Total Files

4

Last publish

Collaborators

  • m2de