-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.js
85 lines (62 loc) · 2.07 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Generated by CoffeeScript 1.6.3
var async = require('async');
var LolClient = require('./lol-client');
util = require('util');
options = {
region: 'euw',
username: '',
password: '',
version: '3.9.13_07_01_27',
debug: true
};
var client = new LolClient(options);
client.on('connection', function() {
console.log('Connected');
async.waterfall([
function (callback){
client.getSummonerByName('NSZombie', function(err, result) {
callback(err, result);
});
}, function (result, callback){
client.getSummonerStats(result.object.acctId.value, function(err, result) {
callback(err, result);
});
}
], function (err, result){
console.log(err, result);
});
/* async.parallel([
function (callback){
client.getSummonerStats(36910949, function(err, result) {
console.log(1);
callback(err, result);
});
}, function (callback){
client.getSummonerByName('Ichiriki Orihara', function(err, result) {
console.log(2);
callback(err, result);
});
}
], function (err, result){
console.dir(err, result);
});*/
/* client.getSummonerStats(summoner.summonerId, function(err, result) {
console.dir(result);
});*/
/*client.getMatchHistory(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getAggregatedStats(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getTeamsForSummoner(summoner.summonerId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
client.getTeamById(summoner.teamId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
return client.getSummonerData(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});*/
});
client.connect();