public async Task <bool> DeleteQuiz(int id)
        {
            var result = await _httpDataService.DeleteAsync($"quiz/{id}", await LoginService.Login());

            return(result);
        }
        public async Task <bool> EditQuiz(int id, Quiz editedQuiz)
        {
            var result = await _httpDataService.PatchAsJsonAsync($"quiz/{id}", editedQuiz, await LoginService.Login());

            return(result);
        }
        public async Task <Quizzes> GetAllQuizzes()
        {
            var result = await _httpDataService.GetAsync <Quizzes>("quiz", await LoginService.Login());

            return(result);
        }
        public async Task <bool> AddQuiz(Quiz newQuiz)
        {
            var result = await _httpDataService.PostAsJsonAsync("quiz", newQuiz, await LoginService.Login());

            return(result);
        }
예제 #5
0
        public async Task <bool> EditRound(int id, Round editedRound)
        {
            var result = await _httpDataService.PatchAsJsonAsync($"round/{id}", editedRound, await LoginService.Login());

            return(result);
        }
예제 #6
0
        public async Task <Rounds> GetAllRoundsByEnabledQuiz()
        {
            var result = await _httpDataService.GetAsync <Rounds>("round", await LoginService.Login());

            return(result);
        }
        public async Task <bool> EditTeam(int id, Team editedTeam)
        {
            var result = await _httpDataService.PatchAsJsonAsync($"team/{id}", editedTeam, await LoginService.Login());

            return(result);
        }
        public async Task <bool> PatchTeamScore(int id, int score)
        {
            var result = await _httpDataService.PatchAsJsonAsync($"team/score/{id}", new Team { TeamScore = score }, await LoginService.Login());

            return(result);
        }
        public async Task <Teams> GetAllTeams()
        {
            var result = await _httpDataService.GetAsync <Teams>("team", await LoginService.Login());

            return(result);
        }