Nervous Parrot Muttering
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

withings-api

0.1.2 • Public • Published

Withings API

A javascript module to help generate OAuth signed Withings API URL

Install

  1. npm install withings-api

Usage

var withingsApi = require("withings-api");
 
withingsApi.generateUrl({
    url: "http://wbsapi.withings.net/measure",
    parameters: {
        action: "getmeas",
        userid: "THE USER's ID"
    },
    consumer_key: "YOU APP'S KEY",
    consumer_secret: "YOU APP'S SECRET",
    access_token: "YOUR USER-SPECIFIC ACCESS TOKEN",
    access_token_secret: "YOUR USER-SPECIFIC ACCESS TOKEN SECRET",
    callback: "URL TO YOUR APP"
});

Gotchas

  1. Don't pass in callback when requesting for activity measure (http://wbsapi.withings.net/v2/measure?action=getactivity)
    1. Otherwise you'll get response of {"status":503,"error":"Invalid Params"}

Test

  1. npm test

Keywords

install

npm i withings-api

Downloadsweekly downloads

0

version

0.1.2

license

MIT

repository

Gitbitbucket

last publish

collaborators

  • avatar
Report a vulnerability