|
|
@@ -48,8 +48,10 @@ export class FrontcraftCharacterComponent implements OnInit{
|
|
48
|
48
|
|
|
49
|
49
|
this.dataLink = "https://classic.warcraftlogs.com:443/v1/parses/character/"+this.char.charactername.replace(/^\w/, c => c.toUpperCase())+"/Gandling/EU?api_key=c698515ab4f592cdb848d80b3abe616c&metric=dps"
|
|
50
|
50
|
|
|
|
51
|
+
|
|
|
52
|
+
|
|
51
|
53
|
fetch(this.dataLink).then(raw => raw.json().then((json) => {
|
|
52
|
|
- if(json.length > 0) return
|
|
|
54
|
+ if(json.length < 1) return
|
|
53
|
55
|
const data = json[0]
|
|
54
|
56
|
|
|
55
|
57
|
this.boss2 = {
|
|
|
@@ -65,13 +67,18 @@ export class FrontcraftCharacterComponent implements OnInit{
|
|
65
|
67
|
}))
|
|
66
|
68
|
|
|
67
|
69
|
fetch(this.dataLink).then(raw => raw.json().then((json) => {
|
|
68
|
|
- if(json.length > 1) return
|
|
|
70
|
+ if(json.length < 2) return
|
|
|
71
|
+ console.log(json);
|
|
|
72
|
+
|
|
69
|
73
|
const data = json[1]
|
|
70
|
74
|
|
|
71
|
75
|
this.boss1 = {
|
|
72
|
76
|
name: data.encounterName,
|
|
73
|
77
|
date: data.startTime
|
|
74
|
78
|
}
|
|
|
79
|
+
|
|
|
80
|
+
|
|
|
81
|
+
|
|
75
|
82
|
this.gear2 = data.gear.map(item => {return <Item>{
|
|
76
|
83
|
itemname: item.name,
|
|
77
|
84
|
iconname: item.icon.replace('.jpg', ''),
|