public YahooApiRequestController(Helpers helpers, YahooApiEndPoints endPoints, YahooAuthController yahooAuthController, IHttpContextAccessor contextAccessor, BaseballScraperContext context, IOptions <TheGameIsTheGameConfiguration> theGameConfig)
 {
     _helpers             = helpers;
     _endPoints           = endPoints;
     _yahooAuthController = yahooAuthController;
     _contextAccessor     = contextAccessor;
     _context             = context;
     _theGameConfig       = theGameConfig.Value;
 }
        // STATUS [ June 7, 2019 ] : this works
        // STEP 2
        /// <summary>
        ///     Each yahoo league has a unique id
        ///     This method gets the id for the league you want data from
        ///     The league key suffix is in a config file
        ///     Method is ultimately called in 'GetTheGameIsTheGameLeagueKey' method
        /// </summary>
        /// <returns>
        ///     A string of lowercase L + the league id
        ///     e.g., l.1234 OR l.679
        /// </returns>
        public string GetTheGameIsTheGameLeagueKeySuffix()
        {
            TheGameIsTheGameConfiguration theGameConfig = new TheGameIsTheGameConfiguration();
            Type theGameConfigType = theGameConfig.GetType();

            TheGameIsTheGameConfiguration configObject = _newtonHandler.DeserializeJsonFromFile(
                theGameConfigFilePath,
                theGameConfigType
                ) as TheGameIsTheGameConfiguration;

            string leagueKeySuffix = configObject.LeagueKeySuffix;

            return(leagueKeySuffix);
        }
Exemplo n.º 3
0
 public YahooManagerController(IOptions <TheGameIsTheGameConfiguration> theGameConfig, YahooApiRequestController yahooApiRequestController, YahooAuthController yahooAuthController)
 {
     _theGameConfig             = theGameConfig.Value;
     _yahooApiRequestController = yahooApiRequestController;
     _yahooAuthController       = yahooAuthController;
 }
 public YahooTeamStatsController(Helpers helpers, IOptions <TheGameIsTheGameConfiguration> theGameConfig, YahooApiRequestController yahooApiRequestController)
 {
     _helpers                   = helpers;
     _theGameConfig             = theGameConfig.Value;
     _yahooApiRequestController = yahooApiRequestController;
 }
 public YahooTeamPointsController(IOptions <TheGameIsTheGameConfiguration> theGameConfig, YahooApiRequestController yahooApiRequestController)
 {
     _theGameConfig             = theGameConfig.Value;
     _yahooApiRequestController = yahooApiRequestController;
 }
 public YahooScoreboardController(IOptions <TheGameIsTheGameConfiguration> theGameConfig, YahooApiRequestController yahooApiRequestController)
 {
     _theGameConfig             = theGameConfig.Value;
     _yahooApiRequestController = yahooApiRequestController;
 }