-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
456dab2
commit e7a2811
Showing
7 changed files
with
133 additions
and
86 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.User = void 0; | ||
class User { | ||
constructor() { | ||
this.ReportMatches = false; | ||
this.airDrops = new AirDrops(); | ||
this.alias = ""; | ||
this.biography = ""; | ||
this.boosterPacks = []; | ||
this.cards = []; | ||
this.councilParticipation = new CouncilParticipation(); | ||
this.ownedCardSchemes = []; | ||
this.ownedPrototypes = []; | ||
this.profileCard = 0; | ||
this.voteRights = []; | ||
this.website = ""; | ||
} | ||
static from(json) { | ||
let user = Object.assign(new User(), json); | ||
user.airDrops = AirDrops.from(json.airDrops); | ||
user.councilParticipation = CouncilParticipation.from(json.councilParticipation); | ||
return user; | ||
} | ||
} | ||
exports.User = User; | ||
class AirDrops { | ||
constructor() { | ||
this.vote = false; | ||
this.create = false; | ||
this.buy = false; | ||
this.play = false; | ||
this.user = false; | ||
} | ||
static from(json) { | ||
return Object.assign(new AirDrops(), json); | ||
} | ||
} | ||
class CouncilParticipation { | ||
constructor() { | ||
this.council = 0; | ||
this.status = ""; | ||
} | ||
static from(json) { | ||
return Object.assign(new CouncilParticipation(), json); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export class User { | ||
ReportMatches: boolean = false | ||
airDrops: AirDrops = new AirDrops() | ||
alias: string = "" | ||
biography: string = "" | ||
boosterPacks: Array<any> = [] | ||
cards: Array<number> = [] | ||
councilParticipation: CouncilParticipation = new CouncilParticipation() | ||
ownedCardSchemes: Array<number> = [] | ||
ownedPrototypes: Array<number> = [] | ||
profileCard: number = 0 | ||
voteRights: Array<any> = [] | ||
website: string = "" | ||
|
||
static from(json) { | ||
let user: User = Object.assign(new User(), json); | ||
user.airDrops = AirDrops.from(json.airDrops) | ||
user.councilParticipation = CouncilParticipation.from(json.councilParticipation) | ||
return user | ||
} | ||
} | ||
|
||
class AirDrops { | ||
vote: boolean = false | ||
create: boolean = false | ||
buy: boolean = false | ||
play: boolean = false | ||
user: boolean = false | ||
|
||
static from(json) { | ||
return Object.assign(new AirDrops(), json); | ||
} | ||
} | ||
|
||
class CouncilParticipation { | ||
council: number = 0 | ||
status: string = "" | ||
|
||
static from(json) { | ||
return Object.assign(new CouncilParticipation(), json); | ||
} | ||
} |
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
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