UNPKG

roar-sdk

Version:

Node.js SDK for developing Roar inspectors

80 lines (56 loc) 2.26 kB
# Node.js Roar SDK Overview: Roar SDK is designed to make development for Roar Inspectors easy and consistent. It provides all the needed functionality common to inspectors and Roar specific resources an inspector might need. Status: [![NPM version](https://badge.fury.io/js/roar-sdk.svg)](http://badge.fury.io/js/roar-sdk) [![Dependencies](https://img.shields.io/badge/dependencies-up--to--date-brightgreen.svg)](https://marcfisher@bitbucket.org/liongard/roar-sdk.git) [![Dev Dependencies](https://img.shields.io/badge/dev--dependencies-up--to--date-brightgreen.svg)](https://marcfisher@bitbucket.org/liongard/roar-sdk.git) [![Vulnerabilities](https://img.shields.io/badge/vulnerabilities-None-brightgreen.svg)](https://marcfisher@bitbucket.org/liongard/roar-sdk.git) [![Code Coverage](https://img.shields.io/badge/code--coverage-3.04%-brightgreen.svg)](https://marcfisher@bitbucket.org/liongard/roar-sdk.git) ## Installation ```sh npm install roar-sdk ``` ## Usage To write an inspector using the SDK * Register for a developer account and get your client_id and secret at [Roar Developer Portal](https://developer.roar.liongard.com). * Install the roarcli via ```sh npm install -g roarcli ``` * Generate an inspector via the roarcli ```sh roarcli generate-inspector myinspector ``` * Now begin editing the source file in myinspector/src/index.js using the roar-sdk methods ## Running Tests To run the test suite first invoke the following command within the repo you first need to install the development dependencies (run where the `package.json` is): ```sh npm install ``` Then run the command: ```sh npm test ``` To run the tests without the mocks: ```sh NOCK_OFF=true npm tests ``` To get code coverage run: ```sh npm run coverage ``` ## Before Checking In Make sure you run: ```sh npm run check ``` before doing any checkings. Pre-commit will automatically run test and eslint for you. ## Contribution * If you would like to contribute, please fork the repo and send in a pull request. * Please ensure you run grunt before sending in the pull request. ## License BSD-3-Clause ## Contributions Pull requests and new issues are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.