digitalbazaar/node-bossgeo

Name: node-bossgeo

Owner: Digital Bazaar, Inc.

Description: A node.js wrapper for the Yahoo! BOSS Geo API.

Created: 2013-04-02 17:01:28.0

Updated: 2013-04-02 18:26:12.0

Pushed: 2013-04-02 17:23:46.0

Homepage: null

Size: 107

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

node-bossgeo

A node.js wrapper for the Yahoo! BOSS Geo API.

Installation
npm install bossgeo
Usage

First, create a client using your consumer key and consumer secret:

BossGeoClient = require('bossgeo').BossGeoClient;
bossgeo = new BossGeoClient(
'consumerKey',
'consumerSecret'

Then, you may query the PlaceFinder and PlaceSpotter services as follows:

geo.placefinder({
q: '701 first avenue sunnnyvale'
unction(err, res) {
if (err) {
    console.log('error: ' + err);
    return;
}

console.log(JSON.stringify(res, null, 4));


geo.placespotter({
documentType: 'text/plain',
documentContent: 'I live in San Francisco.'
unction(err, res) {
if (err) {
    console.log('error: ' + err);
    return;
}

console.log(JSON.stringify(res, null, 4));

More information

The bossgeo wrapper will force JSON responses from the BOSS Geo API as well as convert numerical errors to human-readable descriptions.

Placefinder

Placefinder has two parameter types. Documentation on these arguments can be found at:

Placespotter

Placespotter has only one parameter type; docs can be found at:

Oauth 1.0a implementation

This wrapper provides its own OAuth 1.0a implementation, which is complete sans access and refresh token fetching.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.