forked from claudiowilson/LeagueJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
88 lines (75 loc) · 2.14 KB
/
app.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
86
87
88
/*global require*/
/*global exports*/
/*global console*/
'use strict';
var leagueApi = require('./lib/lolapi');
leagueApi.init('your api key here', 'euw');
//All the errors should be null if you pass a valid key
var options = {champData: 'allytips,blurb', version : '4.4.3', locale: 'en_US'}
leagueApi.Static.getVersions('na', function (err, champs) {
if(err) {
console.log(err);
} else {
console.log(champs);
}
});
// leagueApi.getChampions(true, 'na', function (err, champs) {
// if (err) {
// console.log(err);
// return;
// }
// champs.forEach(function (champ) {
// if (champ.freeToPlay) {
// console.log(champ.name + ' is free to play!!');
// }
// });
// });
/* Returns an error if player has no league data */
//leagueApi.getLeagueData(22097256, function (err, data) {
// if (err) {
// console.log(err);
// return;
// }
// console.log(data);
//});
//leagueApi.getRecentGames(40500341, 'na', function (err, data) {
// console.log(err);
// console.log(data);
//});
// leagueApi.Summoner.getByName('Yolo Swag 5ever', null, function (err, data) {
// console.log(err);
// console.log(data);
// });
/*
*
* Returns an error if player hasn't played ranked.
* And if player (pro player) has played ranked but has no ranked data? Reset by RIOT?
*/
//leagueApi.Stats.getRanked(19321078, null, function (err, data) {
// console.log(err);
// console.log(data);
//});
//leagueApi.Summoner.getRunes(40500341, function (err, data) {
// console.log(data);
//});
//leagueApi.Summoner.getByName("EvLSnoopY", function (err, summoner) {
// if (!err) {
// console.log(summoner);
// }
//});
//leagueApi.Summoner.getByID(19321078, function (err, summoner) {
// if (!err) {
// console.log(summoner);
// }
//});
//leagueApi.Summoner.listNamesByIDs('19321078,62746', function (err, data) {
// console.log(err);
// console.log(data);
//});
//leagueApi.getTeams(19321078, function (err, data) {
// console.log(err);
// console.log(data);
//});
//leagueApi.getMapNames(function(err, regions) {
// console.log(regions[2]);
//});