public async Task InitializeBot() { var configJson = JsonConfigurationReader.GetJsonConfigurationWithMyTokens(); RegisterDiscordClient(configJson); RegisterCommands(configJson); await Run(); }
public PokedollarServiceProvider() { var configJson = JsonConfigurationReader.GetJsonConfigurationWithMyTokens(); _todaysExchangeRateToken = configJson.TodaysExchangeRateToken; _historicExchangeRateToken = configJson.HistoricExchangeRateToken; _searchEngineId = configJson.SearchEngineId; _searchToken = configJson.SearchToken; }
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); }
public NasaServiceProvider() { var jsonConfig = JsonConfigurationReader.GetJsonConfigurationWithMyTokens(); _apodClient = new ApodClient(jsonConfig.NasaToken); }