简体   繁体   English

尝试使用github js API,但无法正常工作

[英]Trying to work with the github js api but it doesnt work

I run these lines using https://github.com/michael/github 我使用https://github.com/michael/github运行这些行

issues = github.getIssues "twbs", "bootstrap"

console.log issues

issues.list (err, issues) ->
  console.log issues

And the first part works Github.Issue {list: function} , but then it says 第一部分是Github.Issue {list: function} ,但是随后它说

Uncaught TypeError: undefined is not a function 
    (anonymous function) github.js:585
    _request.xhr.onreadystatechange

issues.list() accepts two arguments: issues.list()接受两个参数:

issues.list(options, function(err, issues) {});

You're trying to call it with one argument. 您正在尝试使用一个参数来调用它。 It complains that the second argument is undefined instead of a callback. 它抱怨第二个参数是undefined而不是回调。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM