Esempio n. 1
0
        private async Task FetchQuestions()
        {
            var endpoint = $"/api/solver/{issue.ID}/question";
            var response = await SolverApp.GetRequest(endpoint);

            var fetchedQuestions = response["questions"].ToObject <JArray>();

            for (var i = 0; i < fetchedQuestions.Count; i++)
            {
                InsertQuestion(fetchedQuestions[i]);
            }
        }
Esempio n. 2
0
        private async Task FetchIssues()
        {
            var response = await SolverApp.GetRequest("/api/solver/");

            if (response["issues"] == null)
            {
                return;
            }
            var fetchedIssues = response["issues"].ToObject <JArray>();

            for (int i = 0; i < fetchedIssues.Count; i++)
            {
                var issue = fetchedIssues[i];
                if (issue["assignee"].ToObject <String>() == null)
                {
                    InsertUnassignedIssue(issue);
                }
                else if (issue["assignee"].ToObject <String>() == SolverApp.GetEmail() &&
                         issue["state"].ToObject <String>() != "solved")
                {
                    InsertSolverIssues(issue);
                }
            }
        }