Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

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:

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

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

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

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

bossgeo.placespotter({
    documentType: 'text/plain',
    documentContent: 'I live in San Francisco.'
}, function(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

Something went wrong with that request. Please try again.