Giter Site home page Giter Site logo

withings-cli's Introduction

Withings CLI

PyPI Number of downloads during the last month

A simple way to query Withings API from command line.

withings query [-v API_VERSION] -s SERVICE -p PARAM VALUE -p PARAM VALUE ... USER

Installation

pip install withings-cli

Set your API key and secret

Register as a Withings developer and configure your Withings API key and secret.

withings config apikey [KEY]
withings config apisecret [SECRET]

Note! Do not disclose your API secret to anyone, as per the Withings' Terms of Service, you are responsible for maintaining the secrecy and security of your keys.

Note! Keys will be stored in ~/.withings (programmatically chmod to 0600).

Add user

withings add me

Note! For withings-cli to be able to access user data, the user should allow it to do so (me in this case). This call will automatically open a web browser directed to Withings account login page.

Check who am I

The following call should show mes details โ€” if the above step was accomplished.

withings whois me

Query mes body measures

withings query -v1 -s measure -p action getmeas me

See how the query format corresponds to Withings API reference: https://wbsapi.withings.net/measure?action=getmeas

Read help for more commands and options

withings --help
withings query --help

withings-cli's People

Contributors

kblomqvist avatar

Watchers

 avatar  avatar  avatar

withings-cli's Issues

Pretty print JSON output

Output the JSON pretty printed

$ withings query -v1 -s measure -p action getmeas me
{u'timezone': xxx, u'updatetime': xxx, u'measuregrps': [{u'date': xxx, u'category': 1, u'attrib': 0, u'grpid': xxx, u'measures': [{u'type': x, u'unit': -x, u'value': x}, {u'type': x, u'unit': -x, u'value': x}, {u'type': x, u'unit': -x, u'value': x}, {u'type': x, u'unit': -x, u'value': x}]}, {u'date': x, u'category':...

--> something like this

$ withings query -v1 -s measure -p action getmeas me
{
 u'timezone': xxx, 
 u'updatetime': xxx, 
 u'measuregrps': [
    {
      u'date': xxx, 
      u'category': 1, 
      u'attrib': 0, 
      u'grpid': xxx, 
      u'measures': [
        {
         u'type': x, 
         u'unit': -x, 
         u'value': x
        }, 
...

Daemonize

  1. To be able to authorize users via public web site.
  2. To be able to listen notifications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.