roar-sdk
Version:
Node.js SDK for developing Roar inspectors
80 lines (56 loc) • 2.26 kB
Markdown
# 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:
[](http://badge.fury.io/js/roar-sdk)
[](https://marcfisher@bitbucket.org/liongard/roar-sdk.git)
[](https://marcfisher@bitbucket.org/liongard/roar-sdk.git)
[](https://marcfisher@bitbucket.org/liongard/roar-sdk.git)
[](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.