Snippets

代码片段收集板

github APIedit

日期:

作者: 小胡子哥

Author: 小胡子哥

Email: barret.china(at)gmail.com

var github = require('octonode');
var client = github.client({
  username: 'barretlee',
  password: 'password'
});
var ghrepo = client.repo('barretlee/snippets');
ghrepo.createContents(githubPath, '感谢 ' + fileAuthor + ' 贡献代码', fileContent, 'gh-pages', function(ret){
  console.log(JSON.stringify(arguments, null, 4));
  if(ret["1"] && ret["1"].content) {
    res.write("发送成功");
  } else {
    res.writeHead(200, {
      "Content-Type": "text/html"
    });
    res.write("<pre>" + JSON.stringify(ret, null, 4));
  }
  res.end();
});
标签:

loading...

这网速真是弱爆了...客官稍等,评论还在加载~