コード例 #1
0
        static void Main(string[] args)
        {
            SetUpClient();
            var response = client.GetAsync("people/1").Result;
            //var luke = response.Content.ReadAsStringAsync().Result;
            People luke = response.Content.ReadAsAsync <People>().Result;

            var allPeopleResponse      = client.GetAsync("people").Result;
            PeopleCollection allPeople = allPeopleResponse.Content.ReadAsAsync <PeopleCollection> .Result;
            var nextPage = allPeople.GetNext(client);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Star Wars");
            SetUpClient();
            // var luke = response.Content.ReadAsStringAsync().Result;
            var    luke        = GetPeople("3");
            Planet lukesPlanet = luke.HomeworldDetail(client);

            var allPeopleResponse      = client.GetAsync("people").Result;
            PeopleCollection allPeople = allPeopleResponse.Content.ReadAsAsync <PeopleCollection>().Result;

            allPeople.GetPrevious(client); // instance
            allPeople.GetNext(client);     // instance
        }