Last active
December 11, 2015 10:08
-
-
Save chamerling/4584620 to your computer and use it in GitHub Desktop.
Getting gitorious data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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