//for testing purposes, to not call api the entire time public static IEnumerable <MatchJson> GetMatchesByPlayerIdFromLocal() { string path = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "LeagueDataAnalyzer2", "ExampleData.txt"); string json = File.ReadAllText(path); return(MatchDeserializer.DeserializeMatch(json).Matches); }
public static IEnumerable <MatchJson> GetMatchesByPlayerId(string id) { string json = ApiConnector.GetDataFromUrl(UrlsRepository.GetMatchesByPlayerId(id)); return(MatchDeserializer.DeserializeMatch(json).Matches); }