#AppFog-api
==========
Node Module for interacting with the appfog API

Thanks to Luc Perkins for his repo [appfog-api-docs](https://github.com/lucperkins/appfog-api-docs) it was a great jumoing off point.

#Installation

npm install appfog-api

#Usage
Options in bold are **Required**

##login
**Options**
- `email`:      login email
- `password`:   login password

**Returns**
- `error || null`
- `token`

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

##apps
**Returns**
- `error || null`
- `apps`: Object of 'apps' with keys 0-n (number of applications on your account)

```javascript
afapi = require('appfog-api');
afapi.apps({}, function(error, apps){
  console.log(JSON.stringify(apps, null, 2));
});
```
##app
```javascript
afapi = require('appfog-api');
afapi.app({appname:'someapp'}, function(error, app){
  console.log(JSON.stringify(apps, null, 2));
});
```

##stats
**Options**
- **appname**:  case sensitive name of application to inspect

**Returns**
- `error || null`
- `app`

```javascript
afapi = require('appfog-api');
afapi.services({}, function (error, services) {
    console.log(JSON.stringify(services, null, 2));
});
```

##infras
**Returns**
- `error || null`
- `apps`: Object of 'apps' with keys 0-n (number of applications on your account)

```javascript
afapi = require('appfog-api');
afapi.services({}, function (error, services) {
    console.log(JSON.stringify(services, null, 2));
});
```

##Services
**Returns**
- `error || null`
- `services`: <unknown>

```javascript
afapi = require('appfog-api');
afapi.services({}, function (error, services) {
    console.log(JSON.stringify(services, null, 2));
});
```

#Dev Roadmap
##Version 1.x.x
- login
- info
- apps
- stats
- infras
- update


##version 2.x.x
- create-service
- download
- export-service
- import-service
- delete

##version 3.x.x
- git post recieve hook for deploying application
- install to appfog (CI/CD/scriptable actions)
