node package manager

appfog-api

Provides functions that wraps the AppFog API

AppFog-api

========== Node Module for interacting with the appfog API

Thanks to Luc Perkins for his repo appfog-api-docs it was a great jumoing off point.

Installation

npm install appfog-api

Usage

Options in bold are Required

Options

  • email: login email
  • password: login password

Returns

  • error || null
  • token
afapi = require('appfog-api');
afapi.login({email:'example@example.com', password:'secret'}, function(errortoken){
  var saveThis = token;
});

Returns

  • error || null
  • apps: Object of 'apps' with keys 0-n (number of applications on your account)
afapi = require('appfog-api');
afapi.apps({}, function(errorapps){
  console.log(JSON.stringify(apps, null, 2));
});
afapi = require('appfog-api');
afapi.app({appname:'someapp'}, function(errorapp){
  console.log(JSON.stringify(apps, null, 2));
});

Options

  • appname: case sensitive name of application to inspect

Returns

  • error || null
  • app
afapi = require('appfog-api');
afapi.services({}, function (errorservices) {
    console.log(JSON.stringify(services, null, 2));
});

Returns

  • error || null
  • apps: Object of 'apps' with keys 0-n (number of applications on your account)
afapi = require('appfog-api');
afapi.services({}, function (errorservices) {
    console.log(JSON.stringify(services, null, 2));
});

Returns

  • error || null
  • services:
afapi = require('appfog-api');
afapi.services({}, function (errorservices) {
    console.log(JSON.stringify(services, null, 2));
});

Dev Roadmap

  • login
  • info
  • apps
  • stats
  • infras
  • update
  • create-service
  • download
  • export-service
  • import-service
  • delete
  • git post recieve hook for deploying application
  • install to appfog (CI/CD/scriptable actions)