0.0.10 • Published 10 years ago

moloni v0.0.10

Weekly downloads
9
License
-
Repository
-
Last release
10 years ago

Moloni API client library for node.js

node-moloni aims to provide a complete, asynchronous client library for the Moloni API services (https://www.moloni.com/dev/).

Requirements

You can install node-moloni and its dependencies with npm: npm install moloni.

  • node v0.10+ (earlier versions of node were not tested but it should work as soon as 0.6)

Getting started

var Moloni = require('moloni');
var moloni = new Moloni({
	client_id: 'YOUR_CLIENT_ID',
	client_secret: 'YOUR_CLIENT_SECRET',
	username: 'YOUR_USERNAME',
	password: 'YOUR_PASSWORD'
});

Make an API call

moloni.users('getMe', function (error, result) {
	if (error)
		return console.error(error);

	console.log(result);
});

Getting something more complex done

var params = {
	...
};

moloni.customers('insert', params, function (error, result) {
	if (error)
		return console.error(error);

	console.log(result);
});

Sandbox mode for testing

You can just pass "sandbox: true" to initialize in sandbox mode.

var moloni = new Moloni({
	client_id: 'YOUR_CLIENT_ID',
	client_secret: 'YOUR_CLIENT_SECRET',
	username: 'YOUR_USERNAME',
	password: 'YOUR_PASSWORD',
	sandbox: true
});

Contributors

TODO

Bitdeli Badge

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago