public async Task <string> GetProgress() { LeagueAPI_Variables localVars = await ReadLocalVarsFile(); if (localVars == null) { return("No data being collected."); } return($"Progress is: {localVars.CurrentProgress}"); }
public async Task <string> WriteCurrentlyCollectedData() { LeagueAPI_Variables localVars = await ReadLocalVarsFile(); if (localVars == null) { return("No data being collected."); } localVars.WriteCurrentlyCollectedData = true; await UpdateLocalVarsFile(localVars); return($"The request to write currently collected data was successful."); }
public async Task <string> StopCollectingData() { LeagueAPI_Variables localVars = await ReadLocalVarsFile(); if (localVars == null) { return("No data being collected."); } localVars.StopCollectingData = true; await UpdateLocalVarsFile(localVars); return($"The request to stop collecting data was successful."); }
public async Task <string> CollectData(string apiKey, int maxCountOfGames = 0) { LeagueAPI_Variables localVars = await ReadLocalVarsFile(); if (localVars != null) { return("Data already being collected."); } LeagueAPI_DataCollector dataCollector = new(apiKey); string result = await dataCollector.CollectMatchesData(maxCountOfGames : maxCountOfGames); return(result); }
private static async Task UpdateLocalVarsFile(LeagueAPI_Variables localVars) { await LeagueAPI_DataCollector.UpdateLocalVarsFile(localVars); }