index.js 363 B

123456789101112131415
  1. // search, auth, fork, commit, pull req
  2. var Client = require('github');
  3. var client = new Client({
  4. version: '3.0.0'
  5. });
  6. client.repos.getContent({
  7. user: 'JuanitoFatas',
  8. repo: 'Computer-Science-Glossary',
  9. path: 'dict.textile',
  10. ref: 'master'
  11. }, function(err, res) {
  12. if (!err) {
  13. console.log(new Buffer(res.content, 'base64').toString('utf8'));
  14. }
  15. });