import { IStanding , IStandingData } from '../interfaces/IStanding' ; import { IEntrant } from '../interfaces/IEntrant' ; import { Entrant } from './Entrant' ; export class Standing implements IStanding { public static getDefaultOptions ( ) { return { perPage : 1 , page : null , sortBy : null , filter : null } ; } public static parse ( data ) { return new Standing ( data . id , data . placement , Entrant . parse ( data . entrant ) ) ; } private id : number | null ; private placement : number | null ; private entrant : Entrant ; constructor ( id , placement , entrant ) { this . id = id ; this . placement = placement ; this . entrant = entrant ; } public getId ( ) { return this . id ; } public getPlacement ( ) { return this . placement ; } public getEntrant ( ) { return this . entrant ; } public getGamerTag ( ) { if ( this . entrant ) return this . entrant . getAttendee ( ) . getGamerTag ( ) ; return null ; } }