Skip to content

mattnull/MongoLab.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoLab.js

This library wraps calls from the MongoLab API

Dependencies

jQuery

Usage

	var mongoDB = new MongoLab('YOUR_API_KEY');

	//list databases
	mongoDB.listDatabases(function(data){
		console.log('List Databases : ', data);
	});

	//list collections
	mongoDB.listCollections('blog', function(data){
		console.log('List Collections : ', data);
	});

	//list documents
	mongoDB.listDocuments('blog', 'posts', function(data){
		console.log('List Documents : ', data);
	});

	//insert documents
	mongoDB.insertDocuments('blog', 'posts', {mytest : 'testing'}, function(data){
		console.log('Insert Documents : ', data);
	});

	//delete document
	mongoDB.deleteDocument('blog', 'posts', '502851432', function(data){
		console.log('Delete Document : ', data);
	});

Copyright

Copyright (c) 2012 Matt Null. See LICENSE.txt for further details.

About

JavaScript Library for the MongoLab REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors