You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ingalls f8b67ff828
v4.4.0
6 days ago
.github/workflows Update Secret value 6 days ago
src Fix Body Payload 3 weeks ago
.eslintrc.json Update lint globals 3 weeks ago
.gitignore Initial Commit 2 years ago
.npmrc Add .npmrc 6 days ago
CHANGELOG.md Update CHANGELOG 6 days ago
Dockerfile Fix lints 1 month ago
LICENSE Fix LICENSE file 2 years ago
README.md Update README example 1 month ago
cli.js Migrate to module 1 month ago
oa.js Add query passthrough 3 weeks ago
package-lock.json Update base deps 6 days ago
package.json v4.4.0 6 days ago

README.md

OpenAddresses CLI & Lib

Javascript Library and CLI for the OpenAddresses API

General Usage

Installation

JS Library

npm add '@openaddresses/lib'

CLI

npm add --global @openaddresses/lib

Instantiation

Note: if the username & password is not explicitly set, OA will fallback to checking for a OA_USERNAME & OA_PASSWORD environment variable. For the url parameter, be sure to include the protocol and (if necessary) port number.

Alternatively an API token can be provided via a OA_TOKEN environment variable, or the server secret via the OA_SECRET variable.

JS Library

import OA from '@openaddresses/lib';

const oa = new OA({
    username: 'ingalls',
    password: 'yeaheh',
    url: 'http://example.openaddresses.io',
});

CLI

The CLI tool must be provided the URL to connect to for each subcommand. This can be accomplished by providing the URL to a local or remote OA server. Be sure to include the protocol and, for local connections, the port number.

# Connecting to a remote oa server
./cli.js --url 'https://example.openaddresses.io'
# Connecting to a local oa dev server
./cli.js --url 'http://localhost:5000'