Ejemplo n.º 1
0
        public async Task InitializeBot()
        {
            var configJson = JsonConfigurationReader.GetJsonConfigurationWithMyTokens();

            RegisterDiscordClient(configJson);
            RegisterCommands(configJson);
            await Run();
        }
Ejemplo n.º 2
0
        public PokedollarServiceProvider()
        {
            var configJson = JsonConfigurationReader.GetJsonConfigurationWithMyTokens();

            _todaysExchangeRateToken   = configJson.TodaysExchangeRateToken;
            _historicExchangeRateToken = configJson.HistoricExchangeRateToken;
            _searchEngineId            = configJson.SearchEngineId;
            _searchToken = configJson.SearchToken;
        }
Ejemplo n.º 3
0
        public void GetPokemonImageLink_WorksAsExpected()
        {
            // Arrange -
            var imageLink  = string.Empty;
            var configJson = JsonConfigurationReader.GetJsonConfigurationWithMyTokens();

            // Act -
            imageLink = PokemonInformationGetter.GetPokemonImageLink(configJson.SearchToken, configJson.SearchEngineId, "Pikachu");

            // Assert -
            Assert.True(imageLink.Length > 0);
        }
Ejemplo n.º 4
0
        public NasaServiceProvider()
        {
            var jsonConfig = JsonConfigurationReader.GetJsonConfigurationWithMyTokens();

            _apodClient = new ApodClient(jsonConfig.NasaToken);
        }