Created
September 25, 2018 11:27
-
-
Save martinsileno/e84b6daa11f1469fd7ddb5dd6e913ea9 to your computer and use it in GitHub Desktop.
possible handling for killpoints / killpointsdelta / winpoints / winpointsdelta removal in pubg api 6.0.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/entities/match.spec.ts b/src/entities/match.spec.ts | |
index 5981697..46804bd 100644 | |
--- a/src/entities/match.spec.ts | |
+++ b/src/entities/match.spec.ts | |
@@ -72,8 +72,6 @@ const API_RESPONSE: IMatch = { | |
"headshotKills": 0, | |
"heals": 6, | |
"killPlace": 39, | |
- "killPoints": 1278, | |
- "killPointsDelta": 3.161043, | |
"killStreaks": 0, | |
"kills": 0, | |
"lastKillPoints": 0, | |
@@ -92,8 +90,6 @@ const API_RESPONSE: IMatch = { | |
"walkDistance": 4652.759, | |
"weaponsAcquired": 0, | |
"winPlace": 2, | |
- "winPoints": 1393, | |
- "winPointsDelta": 31.835619 | |
} | |
} | |
}, | |
@@ -413,8 +409,8 @@ interface ExpectedParticipant { | |
headshotKills: number; | |
heals: number; | |
killPlace: number; | |
- killPoints: number; | |
- killPointsDelta: number; | |
+ killPoints?: number; | |
+ killPointsDelta?: number; | |
killStreaks: number; | |
kills: number; | |
lastKillPoints: number; | |
@@ -433,8 +429,8 @@ interface ExpectedParticipant { | |
walkDistance: number; | |
weaponsAcquired: number; | |
winPlace: number; | |
- winPoints: number; | |
- winPointsDelta: number; | |
+ winPoints?: number; | |
+ winPointsDelta?: number; | |
} | |
const participantNix: ExpectedParticipant = { | |
@@ -447,8 +443,6 @@ const participantNix: ExpectedParticipant = { | |
headshotKills: 0, | |
heals: 6, | |
killPlace: 39, | |
- killPoints: 1278, | |
- killPointsDelta: 3.161043, | |
killStreaks: 0, | |
kills: 0, | |
lastKillPoints: 0, | |
@@ -467,8 +461,6 @@ const participantNix: ExpectedParticipant = { | |
walkDistance: 4652.759, | |
weaponsAcquired: 0, | |
winPlace: 2, | |
- winPoints: 1393, | |
- winPointsDelta: 31.835619, | |
}; | |
const participantZakuro: ExpectedParticipant = { | |
diff --git a/src/entities/participant.ts b/src/entities/participant.ts | |
index 7e6d535..011a497 100644 | |
--- a/src/entities/participant.ts | |
+++ b/src/entities/participant.ts | |
@@ -10,8 +10,8 @@ export class Participant { | |
private _headshotKills: number; | |
private _heals: number; | |
private _killPlace: number; | |
- private _killPoints: number; | |
- private _killPointsDelta: number; | |
+ private _killPoints?: number; | |
+ private _killPointsDelta?: number; | |
private _killStreaks: number; | |
private _kills: number; | |
private _lastKillPoints: number; | |
@@ -30,8 +30,8 @@ export class Participant { | |
private _walkDistance: number; | |
private _weaponsAcquired: number; | |
private _winPlace: number; | |
- private _winPoints: number; | |
- private _winPointsDelta: number; | |
+ private _winPoints?: number; | |
+ private _winPointsDelta?: number; | |
constructor(participant: IParticipant) { | |
this._id = participant.id; | |
diff --git a/src/interfaces/match.ts b/src/interfaces/match.ts | |
index c4dfbd5..e8c12d1 100644 | |
--- a/src/interfaces/match.ts | |
+++ b/src/interfaces/match.ts | |
@@ -39,8 +39,8 @@ export interface IParticipantAttributes { | |
headshotKills: number; | |
heals: number; | |
killPlace: number; | |
- killPoints: number; | |
- killPointsDelta: number; | |
+ killPoints?: number; | |
+ killPointsDelta?: number; | |
killStreaks: number; | |
kills: number; | |
lastKillPoints: number; | |
@@ -59,8 +59,8 @@ export interface IParticipantAttributes { | |
walkDistance: number; | |
weaponsAcquired: number; | |
winPlace: number; | |
- winPoints: number; | |
- winPointsDelta: number; | |
+ winPoints?: number; | |
+ winPointsDelta?: number; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment