Scala wrapper for the Withing (Nokia Health) API
This wrapper allows you to use the Health API; it supports OAuth authentication, setting up notifications and querying measurements.
WithingsClient using it's companion object. Provide the API key and secret.
To run authorize:
fetchAuthorizationUrlwhich will return the temporary tokens and the user authorization URL
- Redirect user to the authorization URL
- On your callback URL the verified result will come back when it does call
requestAccessTokenwith the verified result and the temporary tokens obtained in step 1
- If all goes well you should've obtained a permanent API token and secret to use for other calls
To call a method:
getMeasurements with the parameters you want and suply an implicit instance of
WithingsAccessTokens to make an authorized call.
Start the server (
io.ceratech.withings.rest), and provide the following environment variables:
API_KEYthe Withings API key
API_SECRETthe Withings API secret
PORTthe REST server port (defaults to
After starting open the following URL localhost:8080/api-docs/swagger.json to view the API docs (load them in a Swagger Editor/UI).