netpi/dota2

不知道为什么我不能正常使用.

kennx opened this issue · 1 comments

代码

var express = require('express');
var router = express.Router();
var Dota2Api = require('dota').dota2api;
var key = '[key]'; 
var language = 'zh_CN';
var format = 'JSON';

var dota2api = new Dota2Api(key,language,format)

var config={
  account_id : '85417466',
  matches_requested : 10
}

router.get('/', function(req, res, next) {
  dota2api.getMatchHistory(config,function(err,data){
    if(err){
      res.send(err);
    }else{
      res.send(data);
    }
  });
});

module.exports = router;

视图render出来的

{
  name: "ResponseTimeoutError",
  path: "/IDOTA2Match_570/GetMatchHistory/v001/?account_id=85417466&matches_requested=10&key=[key]&language=zh_CN&format=JSON",
  status: -1,
  headers: {

  },
  res: {
    status: -1,
    statusCode: -1,
    headers: {
    },
    size: 0,
    aborted: false,
    rt: 5028,
    keepAliveSocket: true
  }
}

@kennx 你跑下 make test 看看能通么