UNPKG

soccer-go

Version:

Soccer CLI for stats and results.

41 lines (40 loc) 1.17 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const config_1 = __importDefault(require("../config")); class Team { id; name; code; shortName; venue; founded; clubColors; website; coach; runningCompetitions; links; squad; constructor(data) { const baseLink = `${config_1.default.apiBaseUrl}/teams/${data.id}`; this.id = data.id; this.name = data.name; this.code = data.tla; this.shortName = data.shortName; this.venue = data.venue || null; this.founded = data.founded || null; this.clubColors = data.clubColors || null; this.website = data.website || null; this.coach = data.coach || null; this.runningCompetitions = data.runningCompetitions || []; this.squad = data.squad; this.links = { matches: `${baseLink}/matches`, players: `${baseLink}/players`, self: baseLink, }; } } exports.default = Team;