Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="apiBaseUrl"></param>
        /// <param name="primarySubscriptionKey"></param>
        /// <param name="secondarySubscriptionKey"></param>
        public FantasySoccerClient(string primarySubscriptionKey, string secondarySubscriptionKey)
        {
            Uri statApiBaseUrl       = SoccerConfig.StateApiBaseUrl;
            Uri scoreApiBaseUrl      = SoccerConfig.ScoreApiBaseUrl;
            Uri ProjectionApiBaseUrl = SoccerConfig.ProjectionApiBaseUrl;

            AreaServices        = new AreaServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            CompetitionServices = new CompetitionServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            SeasonServices      = new SeasonServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            BoxScoreServices    = new BoxScoreService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            GameServices        = new GameServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            MembershipServices  = new MembershipServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);

            PlayerGameStatServices   = new PlayerGameStatServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerSeasonStatServices = new PlayerSeasonStatServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerServices           = new PlayerServices(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            ScheduleServices         = new ScheduleServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            SeasonServices           = new SeasonServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            StandingServices         = new StandingServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamGameServices         = new TeamGameServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamSeasonService        = new TeamSeasonService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamServices             = new TeamServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            VenueServices            = new VenueServices(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);

            ProjectionServices = new ProjectionServices(ProjectionApiBaseUrl.AbsoluteUri, SoccerConfig.ProjectionPrimarySubscriptionKey, SoccerConfig.ProjectionSecondarySubscriptionKey);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="apiBaseUrl"></param>
        /// <param name="primarySubscriptionKey"></param>
        /// <param name="secondarySubscriptionKey"></param>
        public FantasyDataClient(string primarySubscriptionKey, string secondarySubscriptionKey)
        {
            Uri statApiBaseUrl       = NFLConfig.StateApiBaseUrl;
            Uri scoreApiBaseUrl      = NFLConfig.ScoreApiBaseUrl;
            Uri ProjectionApiBaseUrl = NFLConfig.ProjectionApiBaseUrl;

            DailyFantasyService           = new DailyFantasyService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            SeasonService                 = new SeasonService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            NewsService                   = new NewsService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerGameStatService         = new PlayerGameStatService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerSeasonStatService       = new PlayerSeasonStatService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamDefenseService            = new TeamDefenseService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            GameService                   = new GameService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            InjuryService                 = new InjuryService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            StadiumService                = new StadiumService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamService                   = new TeamService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            BoxScoreService               = new BoxScoreService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            PlayerService                 = new PlayerService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            ScheduleService               = new ScheduleService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TimeFrameService              = new TimeFrameService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamSeasonService             = new TeamSeasonService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            TeamGameService               = new TeamGameService(statApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            ScoresService                 = new ScoresService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            ScoresService                 = new ScoresService(scoreApiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
            DfsSlateService               = new DfsSlateService(ProjectionApiBaseUrl.AbsoluteUri, NFLConfig.ProjectionPrimarySubscriptionKey, NFLConfig.ProjectionSecondarySubscriptionKey);
            PlayerGameProjectionsService  = new PlayerGameProjectionService(ProjectionApiBaseUrl.AbsoluteUri, NFLConfig.ProjectionPrimarySubscriptionKey, NFLConfig.ProjectionSecondarySubscriptionKey);
            PlayerSeasonProjectionService = new PlayerSeasonProjectionService(ProjectionApiBaseUrl.AbsoluteUri, NFLConfig.ProjectionPrimarySubscriptionKey, NFLConfig.ProjectionSecondarySubscriptionKey);
        }
Beispiel #3
0
        public async void GetBoxScore(int idTeam)
        {
            IsBusy   = true;
            BoxScore = new List <Boxscore>();

            var boxScoreService = new BoxScoreService();

            BoxScore = await boxScoreService.GetBoxScore(idCalendario, idTeam);

            IsBusy = false;
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="apiBaseUrl"></param>
 /// <param name="primarySubscriptionKey"></param>
 /// <param name="secondarySubscriptionKey"></param>
 public FantasyDataClient(Uri apiBaseUrl, string primarySubscriptionKey, string secondarySubscriptionKey)
 {
     DailyFantasyService     = new DailyFantasyService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     SeasonService           = new SeasonService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     NewsService             = new NewsService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     PlayerGameStatService   = new PlayerGameStatService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     PlayerSeasonStatService = new PlayerSeasonStatService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     TeamDefenseService      = new TeamDefenseService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     GameService             = new GameService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     InjuryService           = new InjuryService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     StadiumService          = new StadiumService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     TeamService             = new TeamService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     BoxScoreService         = new BoxScoreService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     PlayerService           = new PlayerService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
     ScheduleService         = new ScheduleService(apiBaseUrl.AbsoluteUri, primarySubscriptionKey, secondarySubscriptionKey);
 }