lib/main.js
function(node_id, options, callback) {
	var that = this;

	if (typeof options === 'function') {
		callback = options;
	}

	var url = that.url + '/db/data/node/' + node_id + '/relationships/';

	// Set direction of relationships to retrieve.
	if (options.direction && (options.direction === 'in' || options.direction === 'out')) {
		url += options.direction;
	} else {
		url += 'all';
	}

	// Set types of relationships to retrieve.
	if (options.types && options.types.length >= 1) {
		url += '/' + encodeURIComponent(options.types.join('&'));
	}

	request
		.get(url)
		.set(this.header)
		.end(function(result) {
			switch(result.statusCode) {
				case 200:
					that.addRelationshipIdForArray(result.body, callback);
					break;
				case 404:
					callback(null, false);
					break;
				default:
					callback(new Error('HTTP Error ' + result.statusCode + ' when retrieving relationships for node ' + node_id), null);
			}
		});
}
function(node_id, options, callback) {
	var that = this;

	if (typeof options === 'function') {
		callback = options;
	}

	var url = that.url + '/db/data/node/' + node_id + '/relationships/';

	// Set direction of relationships to retrieve.
	if (options.direction && (options.direction === 'in' || options.direction === 'out')) {
		url += options.direction;
	} else {
		url += 'all';
	}

	// Set types of relationships to retrieve.
	if (options.types && options.types.length >= 1) {
		url += '/' + encodeURIComponent(options.types.join('&'));
	}

	request
		.get(url)
		.set(this.header)
		.end(function(result) {
			switch(result.statusCode) {
				case 200:
					that.addRelationshipIdForArray(result.body, callback);
					break;
				case 404:
					callback(null, false);
					break;
				default:
					callback(new Error('HTTP Error ' + result.statusCode + ' when retrieving relationships for node ' + node_id), null);
			}
		});
}
/* Get Relationships of a Node ---------