示例#1
0
 public string GetPagesById(string id)
 {
     RestClient = new RestClient.RestClient {
         EndPoint = Pages + id, HttpMethod = Prototype.RestClient.RestClient.HttpVerb.GET
     };
     return(Response = RestClient.DoRequest());
 }
示例#2
0
 public string GetCourses()
 {
     RestClient = new RestClient.RestClient {
         EndPoint = Courses, HttpMethod = Prototype.RestClient.RestClient.HttpVerb.GET
     };
     return(Response = RestClient.DoRequest());
 }
        public void ShowSentence()
        {
            //Instantiation of our RestClient object
            RestClient = new RestClient.RestClient {
                EndPoint = url
            };
            string Response = RestClient.DoRequest();

            Console.WriteLine(Response.ToString());
            Sentences = JsonConvert.DeserializeObject <List <Cloze> >(Response);
            DoTransitions();
        }
示例#4
0
        public void ShowQuestions()
        {
            //Instantiation of our RestClient object
            RestClient = new RestClient.RestClient {
                EndPoint = url
            };
            string Response = RestClient.DoRequest();

            Console.WriteLine(Response.ToString());
            //JsonCovert does exactly what is says...
            Contents = JsonConvert.DeserializeObject <List <Content> >(Response);
            ModifyData();
            DoTransition();
        }