-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathexample.js
54 lines (46 loc) · 1.7 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
// Generated by CoffeeScript 1.6.3
(function() {
var LolClient, client, options, summoner, util;
LolClient = require('./lol-client');
util = require('util');
options = {
region: 'na',
username: 'username', // LOWERCASE OR IT WILL NOT WORK. Please add a function to convert to lowercase just in case.
password: 'password',
version: '3.15.13_12_13_16_07'
};
summoner = {
name: 'HotshotGG',
acctId: 434582,
summonerId: 407750,
teamId: "TEAM-a1ebba15-986f-488a-ae2f-e081b2886ba4"
};
client = new LolClient(options);
client.on('connection', function() {
setInterval(client.HeartBeat, 5000)
console.log('Connected');
client.getSummonerByName(summoner.name, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
/*
client.getSummonerStats(summoner.acctId, function(err, result) {
return console.log(util.inspect(result, false, null, true));
});
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();
}).call(this);