public static JArray ReturnBooksByTitle(string title) { var getAllBooksUrl = EndpointsConstants.BaseUrl + "/api/books?title=" + title; var response = EndpointsHelpMethods.CreateGetRequest(getAllBooksUrl); var responseJson = response.Content.ReadAsStringAsync().Result; JArray arr = JArray.Parse(responseJson); return(arr); }
public static int ReturnBooksCount() { var getAllBooksUrl = EndpointsConstants.BaseUrl + "/api/books"; var response = EndpointsHelpMethods.CreateGetRequest(getAllBooksUrl); var responseJson = response.Content.ReadAsStringAsync().Result; JArray arr = JArray.Parse(responseJson); return(arr.Count); }