-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexamples.html
111 lines (110 loc) · 4.37 KB
/
examples.html
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="wowapi.js"></script>
</head>
<body>
<script type="text/javascript">
$(function () {
//create a WOWAPI object for eu region and locale en_GB
var wow = new WOWAPI("eu", "en_GB")
//retrieve an achievement using a callback function to handle response
wow.getAchievement(2144, function (data) {
console.log(data)
});
//retrieve auctions for a given realm
wow.getAuctions("medivh", function (data) {
console.log(data)
});
//This provides data about a individual battle pet ability ID.
wow.getBattlePetAbility(640, function (data) {
console.log(data)
});
//This provides the data about an individual pet species.
wow.getBattlePetSpecies(640, function (data) {
console.log(data)
});
//Provides battle pet stats for given level, quality and breed, or defaults if are not specified
wow.getBattlePetStats({
speciesId: 640,
level: 25,
breedId: 3,
qualityId: 1
}, function (data) {
console.log(data);
});
//The data in this request has data for all 9 challenge mode maps (currently). Set first param to null if you want the region leaderboard
wow.getChallengeLeaderboard("steamwheedle-cartel", function (data) {
console.log(data);
});
wow.getChallengeLeaderboard(null, function (data) {
console.log(data);
});
//The Character Profile API is the primary way to access character information.
wow.getCharacterProfile({
realm: "steamwheedle-cartel",
characterName: "HarapAlb"
}, function (data) {
console.log(data);
});
wow.getCharacterProfile({
realm: "steamwheedle-cartel",
characterName: "HarapAlb",
fields: "items"
}, function (data) {
console.log(data);
});
wow.getCharacterProfile({
realm: "steamwheedle-cartel",
characterName: "HarapAlb",
fields: "items, pets, stats, titles"
}, function (data) {
console.log(data);
});
//The item API provides detailed item information. This includes item set information if this item is part of a set.
wow.getItem(18803, function (data) {
console.log(data)
});
//The item set data provides the data for an item set.
wow.getIemSet(1060, function (data) {
console.log(data);
});
//The guild profile API is the primary way to access guild information.
wow.getGuildProfile({
realm: "steamwheedle-cartel",
guildName: "House of Elements"
}, function (data) {
console.log(data);
});
wow.getGuildProfile({
realm: "steamwheedle-cartel",
guildName: "House of Elements",
fields: "members, achievements, news, challenge"
}, function (data) {
console.log(data);
});
//The PVP leaderboard api provides detailed PVP leaderboard information.
wow.getPVPLeaderboard("3v3", function (data) {
console.log(data);
});
// The realm status API allows developers to retrieve realm status information. This information is limited to whether or not the realm is up, the type and state of the realm, the current population, and the status of the two world pvp zones.
// There are no required query string parameters when accessing this resource, although the "realms" query string parameter can optionally be passed to limit the realms returned to one or more.
wow.getRealmStatus(null, function (data) {
console.log(data);
});
wow.getRealmStatus("steamwheedle-cartel,medivh", function (data) {
console.log(data);
});
//The recipe API provides basic recipe information.
wow.getRecipe(33994, function (data) {
console.log(data);
});
//The spell API provides some information about spells.
wow.getSpell(8056, function (data) {
console.log(data);
});
});
</script>
</body>
</html>