private static async Task GetRecipes(string recipe) { //This is how I have set up calls to the RestApp //PARAMS: string method, string query Response response = await RestApp.Request("GET", recipe); //serialize the response to a string string jsonResponse = await response.Content.ReadAsStringAsync(); //Create a JObject from the string jsonResponse JObject recipes = JObject.Parse(jsonResponse); //Create a JArray from a key element in the JSON(hits) //hits is a JSON Array of objects hence, the need to convert the JObject into an Array JArray recipeArr = JArray.Parse(recipes["hits"].ToString()); //Loop through all of the objects found in recipes["hits"] for (var i = 0; i < recipeArr.Count(); ++i) { //Due to our set toLimit in the RestRequest application we will at maximum only get 25 recipes back. recipeList.Add(recipeArr[i]["recipe"]["label"].ToString()); } }
public DeploymentDAO(RestApp restApp) { this.restApp = restApp; }
public TaskDAO(RestApp restApp) { this.restApp = restApp; }
public FormDAO(RestApp restApp) { this.restApp = restApp; }
public ProcessDAO(RestApp restApp) { this.restApp = restApp; }