Package Exports
- graphcommons
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (graphcommons) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node.js Wrapper For Graph Commons API.
More detailed API documentation:
http://graphcommons.github.io/api-v1/
Installation
npm install graphcommons
Usage
> var gc = require('graphcommons');
> var accesskey = process.env.YOURENVIRONMENTACCESSKEYWHICHYOUSHOULDNOTSTOREINYOURCODE;
> var callback = function(result) {
console.log('log:', result);
}
> var graphcommons = new graphcommons(accesskey, callback);
log: { msg: 'Working' }
Get graph
> var callback = function(graph) {
console.log('log:', graph);
console.log('edges: ', graph.edges);
console.log('nodes: ', graph.nodes);
}
> graphcommons.graphs('f71116ba-cf77-4703-826a-daac2ab2f085',callback);
Update Graph
var signals = { "signals" : [
{
"action": "node_create",
"type": "NodeType",
"name": "NodeName",
"description": "test description",
"properties": {
"prop1": "one",
"prop2": 2
}
}
]
};
> var callback = function(graph) {
console.log('log:', graph);
console.log('edges: ', graph.edges);
console.log('nodes: ', graph.nodes);
}
> graphcommons.update_graph('f71116ba-cf77-4703-826a-daac2ab2f085',signals,callback);###TODO
- Graph Utility Functions
- Add Mocha for tests
- Better wrapper for Signals?