예제 #1
0
        public static async Task <JObject> GetBoxscore(WebRequester requester, string gameDir)
        {
            string url    = CreateUrl(gameDir);
            var    result = await requester.RequestJson <JObject>(url);

            return(SanitizeResult(result));
        }
예제 #2
0
        public static async Task <JObject> GetPitcher(WebRequester requester, string gameDir, int id)
        {
            string url    = CreateUrl(PitcherUrl, gameDir, id);
            var    result = await requester.RequestXml <JObject>(url);

            return(SanitizePitcherResult(result));
        }
예제 #3
0
        public static async Task <JObject> GetScoreboard(WebRequester requester, DateTime date)
        {
            string url    = CreateUrl(date);
            var    result = await requester.RequestJson <JObject>(url);

            return(SanitizeResult(result));
        }
예제 #4
0
        public static async Task <JObject> GetStandings(WebRequester requester, DateTime date)
        {
            // use yesterday's midnight, since we want standings as of that date, rather than future
            date = date.AddDays(-1);
            string url    = CreateUrl(date);
            var    result = await requester.RequestJson <JObject>(url);

            return(SanitizeResult(result));
        }