20 lines
584 B
TypeScript
20 lines
584 B
TypeScript
import {Injectable} from '@angular/core';
|
|
import {AppConfig} from '../../app.config';
|
|
import {HttpGateway} from '../http-gateway';
|
|
|
|
@Injectable()
|
|
export class PlayerService {
|
|
|
|
constructor(private httpGateway: HttpGateway,
|
|
private config: AppConfig) {
|
|
}
|
|
|
|
getCampaignPlayer(campaignId: string, playerName: string) {
|
|
return this.httpGateway.get(this.config.apiPlayersPath + '/single/' + campaignId + '/' + playerName);
|
|
}
|
|
|
|
getCampaignHighscore(campaignId: string) {
|
|
return this.httpGateway.get(this.config.apiPlayersPath + '/ranking/' + campaignId);
|
|
}
|
|
}
|