Example #1
0
        static void Main(string[] args)
        {
            var service = new UsdaApiClientService("eIQTHeqjEITpxwy1AcdHXijwJFRwI8WDSasId5pK", "http://api.nal.usda.gov/ndb/list");
            var query = new NutrientListQuery()
            {
                ListType = "n",
                Offset = "10",
                Max = "5"
            };
            var result = service.Retrieve(query).Result;

            Console.WriteLine(result);

            Console.WriteLine("\r\nPress any key to continue...");
            Console.Read();
        }
Example #2
0
 public void WhenIQueryTheAPIForAListOf(string listType)
 {
     var query = new NutrientListQuery()
     {
         ListType = listType
     };
     _result = _service.Retrieve(query).Result;
 }