Exemplo n.º 1
0
        public static async Task DemoGetStage()
        {
            // create provider
            OWLAsyncApiDataProvider asyncProvider = new OWLAsyncApiDataProvider();

            // get schedule object
            ScheduleResponse schedule = await asyncProvider.FetchSchedule();

            // get next stage
            Stage stage = schedule.GetNextStage();

            Console.Out.WriteLine($"The next stage of the current OWL season is: {stage.Name}");
        }
Exemplo n.º 2
0
        public static async Task DemoGetMatch()
        {
            // create provider
            OWLAsyncApiDataProvider asyncProvider = new OWLAsyncApiDataProvider();

            // get schedule object
            ScheduleResponse schedule = await asyncProvider.FetchSchedule();

            // get the stage using the name, index/id can also be used
            Stage stage = schedule.GetStage("Stage 1");

            // get the next match in this stage
            StageMatch nextMatch = stage.GetNextMatch();

            Console.Out.WriteLine($"Next match is: {nextMatch.Team1.Name} vs {nextMatch.Team2.Name} at {nextMatch.StartDateTimeOffset()}");
        }