First of all, thanks for taking the time to write this API and upload it. I'm quite happy with it so far as it saved me a lot of potential time.
However, i noticed a bug.
When a summoner has been inactive for a long time and has no matches in his history the request to that summoner will crash the server:
parsing http://euw.op.gg/summoner/userName=khiranhi
C:\op.gg-api-master\server.js:179
recent.wins = parseInt(temp[2].slice(0,-1));
^
TypeError: Cannot read property 'slice' of undefined
at Request.parseSummoner as _callback
at Request.self.callback (C:\op.gg-api-master\node_modules\request\request.j
s:237:22)
at Request.emit (events.js:110:17)
at Request. (C:\op.gg-api-master\node_modules\request\request.js:
1146:14)
at Request.emit (events.js:129:20)
at IncomingMessage. (C:\op.gg-api-master\node_modules\request\req
uest.js:1097:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
First of all, thanks for taking the time to write this API and upload it. I'm quite happy with it so far as it saved me a lot of potential time. However, i noticed a bug.
When a summoner has been inactive for a long time and has no matches in his history the request to that summoner will crash the server:
parsing http://euw.op.gg/summoner/userName=khiranhi C:\op.gg-api-master\server.js:179 recent.wins = parseInt(temp[2].slice(0,-1)); ^ TypeError: Cannot read property 'slice' of undefined at Request.parseSummoner as _callback at Request.self.callback (C:\op.gg-api-master\node_modules\request\request.j s:237:22) at Request.emit (events.js:110:17) at Request. (C:\op.gg-api-master\node_modules\request\request.js:
1146:14)
at Request.emit (events.js:129:20)
at IncomingMessage. (C:\op.gg-api-master\node_modules\request\req
uest.js:1097:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
an example summoner: http://euw.op.gg/summoner/userName=mYi+Salor