0.2.2 • Published 2 years ago

rainway-api v0.2.2

Weekly downloads
-
License
Unlicense
Repository
-
Last release
2 years ago

rainway-api

This is a TypeScript/JavaScript wrapper for the Rainway API that utilizes axios. The module can be used in the following environments:

Environment

  • Node.js
  • Webpack
  • Browserify

Language level

  • ES5 - you must have a Promises/A+ library installed
  • ES6

Module system

  • CommonJS
  • ES6 module system (in Typescript or with a transpiler like Babel, the actual modules are CommonJS)

It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via package.json. (Reference)

Usage

npm install rainway-api

Example usage:

import {Configuration, PeersApi} from "rainway-api"


async function main() {
    const api = new PeersApi(new Configuration({
        username: "pk_live_xxx",
        password: "sk_live_xxx"
    }))
    const peers = (await api.getPeers("123456")).data //123456 being an orgId, found in the url bar when you're logged into the Rainway Hub
    console.log(peers)
}

main()

Building

To build and compile the TypeScript source use:

npm install
npm run build

More information

See the Rainway API Documentation.

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago