🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@rainway/api

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rainway/api

OpenAPI client for @rainway/api

latest
npmnpm
Version
0.2.3
Version published
Maintainers
3
Created
Source

@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.

Keywords

axios

FAQs

Package last updated on 09 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts