@mtgame/core 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/public-team-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +10 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/public-team-api.js +11 -1
- package/fesm2015/mtgame-core.js +8 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/public-team-api.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { ConfigService } from '../services/config.service';
|
|
3
3
|
import { Team } from '../models/team';
|
|
4
4
|
import { TournamentTeam } from '../models/tournament-team';
|
|
5
|
+
import { TeamUser } from '../models/team-user';
|
|
5
6
|
export declare class PublicTeamApi {
|
|
6
7
|
private httpClient;
|
|
7
8
|
private configService;
|
|
8
9
|
constructor(httpClient: HttpClient, configService: ConfigService);
|
|
9
10
|
getById(teamId: number): Promise<Team>;
|
|
10
11
|
getTournamentTeams(teamId: number, leagueId: number): Promise<TournamentTeam[]>;
|
|
12
|
+
getUsers(teamId: number): Promise<TeamUser[]>;
|
|
11
13
|
}
|
|
@@ -12667,6 +12667,16 @@
|
|
|
12667
12667
|
var params = new i1.HttpParams().set('league_id', leagueId.toString());
|
|
12668
12668
|
return this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/public_team/" + teamId + "/tournament_teams/", { params: params }).pipe(operators.map(function (result) { return exports.TournamentTeam.toFront(result); })).toPromise();
|
|
12669
12669
|
};
|
|
12670
|
+
PublicTeamApi.prototype.getUsers = function (teamId) {
|
|
12671
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12672
|
+
return __generator(this, function (_a) {
|
|
12673
|
+
return [2 /*return*/, this.httpClient
|
|
12674
|
+
.get(this.configService.get('apiUrl') + "/api/v1/team/" + teamId + "/users/")
|
|
12675
|
+
.pipe(operators.map(function (data) { return exports.TeamUser.toFront(data); }))
|
|
12676
|
+
.toPromise()];
|
|
12677
|
+
});
|
|
12678
|
+
});
|
|
12679
|
+
};
|
|
12670
12680
|
return PublicTeamApi;
|
|
12671
12681
|
}());
|
|
12672
12682
|
PublicTeamApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PublicTeamApi_Factory() { return new PublicTeamApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: PublicTeamApi, providedIn: "root" });
|