This collection of Javascript code snippets was created to help you integrate Withings Dropshipment APIs.
Required :
- NodeJS
Code snippets are organized in the following way:
wsname / action / action.js
Every action file is associated with a test file in the same directory.
After cloning the repo, install the npm packages with npm install
Prerequisite :
Before using a snippet :
- Change the
CLIENT_IDandCLIENT_SECRETconstants in theconfig.jsfile with your credentials. - Change the
API_URLconstant with the correct endpoint for your case (by default it will it will use the Public API endpoint:https://wbsapi.withings.net/).
Then, uncomment the main function of the action file you're interested in and launch it with node filename.js
To launch tests use : npx jest
Warning : tests won't run properly when the main() function of the file is uncommented.
What do you think of the snippets? Are they helpful? Can they be improved? Let us know by answering these three questions.
Also, feel free to fill in an issue if you find an issue with this project.
- v1 : First version of the code snippets