Skip to content

FrozenRidge/mongolab-partner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongolab-partner

MongoLab Partner API wrapper & CLI interface.

Installation

npm install mongolab-partner

API Usage

var mongolab = require('mongolab-partner')({username: "my-username", password: "super secret"})

mongolab.viewPartner(function(err, res) {
  if (err) return console.log(err)
  console.log(res)
})

API

The module should be initialized with an options object:

{username: ..., password: ...}

It will return an object which implements the following API calls:

viewPartner(cb)

viewAccounts(cb)

createAccount({accountName: ..., adminUser: ..., adminEmail: ...}, cb)

createDatabase({databaseName: ..., databaseUser: ..., databasePassword: ..., plan: ..., cloud: ..., accountName: ...}, cb)

listDatabases(accountName, cb)

viewDatabase(accountName, cb)

deleteDatabase(accountName, databaseName, cb)

CLI

mongolab-partner <command> [options]

Commands map to API calls. The following are available:

  • viewPartner
  • viewAccounts
  • createAccount
  • createDatabase
  • listDatabases
  • viewDatabase
  • deleteDatabase

Create database example:

mongolab-partner createDatabase \
  -u <username>  \
  -p <password>  \
  --accountName <account name> \
  --databaseUsername <database username> \
  --databasePassword <database password> \
  --databaseName <database name>`

View database example:

mongolab-partner viewDatabase \
  -u <username> \
  -p <password> \
  --accountName <account name>\
  --databaseName <database name>

List databases:

mongolab-partner listDatabases -u <username> -p <password> --accountName <account name>

About

MongoLab Partner API wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published