Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

A module for accessing civo cloud apis

License

Notifications You must be signed in to change notification settings

CarbonCollins/civocloud-nodejs

Repository files navigation

civocloud-nodejs

GitHub issues GitHub license GitHub (pre-)release David David Travis Maintainability Test Coverage Known Vulnerabilities

This module is for accessing the v2 civo API which is documented here

v2 of this module has made some changes to the layout of some functions so if you are upgrading you may have to make some changes

installation

  1. install npm
  2. npm install civocloud --save

table of contents

getting started

this package uses native ES6 promises for all api calls.

to use civocloud-nodejs you first need to supply the api token:

const { Civo } = require('civocloud');

const civo = new Civo({ apiToken: 'apiToken' });

a simple example of calling one of the APIs is:

const { Civo } = require('civocloud');

const civo = new Civo({ apiToken: 'apiToken' });

civo.listInstanceSizes().then((sizes) => {
  console.log(sizes);
}).catch((err) => {
  console.error(err);
});

api functions

The api functions are now documented on the API page

Other info

This package is not an official package from civo and has not been made by them as it is just an abstraction layer to the civo API.