2.0.1 • Published 6 years ago

@wwu-restek/srapi v2.0.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
-
Last release
6 years ago

StarRez API Wrapper for Node.js

This module (class) simplifies the process of implementing calls to StarRez's REST API by providing a few wrapper functions.

The module requires a file named sr-credentials.json in the project root (same directory as your main file). This file is not included, for security reasons. It should look something like:

{
  "user": "<your StarRez user name with API permissions>",
  "token": "abcdefg1234567"
}

You'll have to get the token from the StarRez web client. You cannot use your password.

Documentation is not complete.

Crash Course

The module exports a single class: SRAPI. You must instantiate an SRAPI object by passsing a boolean value indicating whether you want to use the production database. Otherwise, it defaults to the sandbox environment.

To use SRAPI, do something like this:

const SRAPI = require('./srapi/api');

const sr = new SRAPI(false);

sr.get('Entry', 6410).then((me) => {
  console.log(me.NameFirst);
}).catch(console.error);

Refer to the JSDocs for more information about the various methods.

2.0.1

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.4

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.1

7 years ago