New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-scalingo

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-scalingo

Node client for Scalingo API

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

node-scalingo

This library is an out-of-the-box HTTP client for the Scalingo API in Node.js.

You can find the detailed Scalingo API specifications on the official API documentation website.

Getting started

1/ Get the following information from Scalingo:

2/ Install the dependency

npm install node-scalingo --save

3/ In your code, define a new ScalingoApi object. Then use the services you need.

const { ScalingoApi } = require('node-scalingo');

const API_TOKEN = '<your_api_token>'; // Enter your own API token
const API_ENDPOINT = 'https://api.osc-fr1.scalingo.com/v1';  // ex: for Outscale region

const scalingoApi = new ScalingoApi(API_TOKEN, API_ENDPOINT);

scalingoApi.apps.listApplications().then(console.log);

Usage

It is recommended to consume services through ScalingoApi.

If you miss a service - this library is still in construction (feb. 2020) -, you can still use ScalingoClient and the query() method, according to the Scalingo developers documentation.

The following example do the same as previously, but with ScalingoClient instead of ScalingoApi.

const { ScalingoClient } = require('node-scalingo');

const API_TOKEN = '<your_api_token>'; // Enter your own API token
const API_ENDPOINT = 'https://api.osc-fr1.scalingo.com/v1';  // ex: for Outscale region

const scalingoClient = new ScalingoClient(API_TOKEN, API_ENDPOINT);

scalingoClient.query('apps', 'get').then((response) => console.log(response.data));

Documentation

Please refer to the Scalingo API guides for help using node-scalingo.

Contributing

Installation

git clone git@github.com:jbuget/node-scalingo.git
cd node-scalingo
npm install
npm run build
npm test

Publishing

npm run release

License

This project is licensed under the AGPL-3.0 License.

Keywords

Scalingo

FAQs

Package last updated on 04 Feb 2020

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