This is the Node.js Javascript SDK, Software Development Kit, for the mediumroast.io. The SDK is comprised of several things:
- A wrapper atop the backend's RESTful APIs for Interaction, Study, Company and User objects.
- A high level written to make it easier to work with the node.js docx package and generated Microsoft Word reports.
- Core Command Line Interface (CLI) utilities for mediumroast.io companies, studies, interactions and user objects.
- Helper CLI utilities to setup your mediumroast.io environment and backup objects.
- Example data to use with the CLIs to add objects to the mediumroast.io.
We actually use this SDK for our own developments, and we do this to ensure that our developers have a first class experience for the mediumroast.io with an always up to date version of the SDK.
This package is available for installation from NPM as mediumroast_js and can be installed and removed via the npm
command. Several approaches to installation are documented below.
Assuming you have installed both node.js and npm the following installation processes are possible.
- Global installation for all users:
sudo npm i -g mediumroast_js
- Local installation for a developer or single user:
npm i mediumroast_js
We recommend the global installation because the CLI utilities will be installed in/usr/local/bin
and available for all users on the system to access.
Coming soon.
The following steps are important if you are developing or extending the Node.js Javascript SDK. If you're not a developer then the current state of the package is not for you. Please wait until we exit the alpha for the mediumroast.io.
Assuming git
is installed and your credentials are set up to talk to the mediumroast.io set of repositories it should be possible to do the following as a user on the system:
mkdir ~/dev;cd ~/dev
git clone git@github.com:mediumroast/mediumroast_js.git
This will create anmediumroast_js
directory in~/dev/
and allow you to proceed to the following steps for installation.
For developers the following steps are suggested to perform a local installation.
- Install node.js.
- Once node.js has been successfully installed you'll need to install the dependencies for the SDK, see the next section on dependencies.
- Install the Local Package Publisher as per the instructions on the package page. We recommend that you install the package globally so that you don't have to worry about it being in the right place. If you choose to install globally you should run
sudo npm install -g local-package-publisher
. - Assuming that you've clone the repo into
~/dev
enter the appropriate directorycd ~/dev/mediumroast_js
. - Install the package globally with
sudo local-package-publisher -p
- Run
npm link mediumroast_js
in target project to consume the library.
The following packages need to be installed before the the SDK will operate correct in a development context. With the npm installation of the mediumroast_js SDK these will automatically be resolved and installed.
- adm-zip
- aws-sdk
- axios
- box-plot
- cli-table
- commander
- configparser
- docx
- json2csv
- node-fetch
- xlsx
- inquirer
You can install all dependencies at once with:
npm i adm-zip, asw-sdk axios box-plot cli-table commander configparser docx json2csv node-fetch xlsx inquirer
.
Documentation for developers that want to consume the SDK is available here. The documentation will continue to improve over time so keep checking in on the doc.
Inclued within this SDK is a CLI for users who are more inclined to use that tool for interacting with the system. These tools will be added and updated to over time as the system evolves. More information on the CLI is available in the CLI User's Guide.
If you detect a problem in the code please open an issue and we will work with you to resolve.