Skip to content

Instantly share code, notes, and snippets.

@chamerling
Last active December 11, 2015 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamerling/4584620 to your computer and use it in GitHub Desktop.
Save chamerling/4584620 to your computer and use it in GitHub Desktop.
Getting gitorious data
/**
* Use the OW2.org gitorious instance for samples.
*
* Copyright(c) 2013 Christophe Hamerling <christophe.hamerling@gmail.com>
* MIT Licensed
*/
var Gitorious = require('../index').Gitorious
, _ = require('underscore');
var client = new Gitorious({url:'http://gitorious.ow2.org'});
console.log('# Getting OW2 Shelbie information : ')
client.getProject('ow2-shelbie', function(err, result) {
if (err) {
console.log('Error:', err);
return;
}
// console.log(JSON.stringify(result, null, 4));
console.log('## Title:', result.project.title);
console.log('### Repositories');
_.each(result.project.repositories.mainlines.repository, function(item) {
console.log(' - ', item.clone_url);
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment