コード例 #1
0
        public ITeam GetTeamById(int id)
        {
            var team = ApiUtility.GetDeserializeObject <StatTeamApi>($"{baseApiUrl}{endpoints[ApiEndpoints.Teams]}/{id}").Teams.FirstOrDefault();

            return(team ?? null);
        }
コード例 #2
0
        public IList <RosterPlayer> GetTeamRoster(int id)
        {
            var apiTeamRoster = ApiUtility.GetDeserializeObject <StatPlayerApi>($"{baseApiUrl}{endpoints[ApiEndpoints.Teams]}/{id}/roster");

            return(apiTeamRoster.Roster ?? null);
        }
コード例 #3
0
        public IList <ITeam> GetAllTeams()
        {
            var apiTeams = ApiUtility.GetDeserializeObject <StatTeamApi>($"{baseApiUrl}{endpoints[ApiEndpoints.Teams]}");

            return(apiTeams.Teams ?? null);
        }