This action may lead to changes in the database
Do you want to continue?
Data Explorer
Request Information
Return the count of how many saved searches the client have.
Parameters:
- ClientId
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
clientId |
Client Id |
integer |
Required |
Response
Code Generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
Assemblies required:
* Newtonsoft.Json;
* System.Collections.Generic;
* System.Net.Http;
* System.Threading.Tasks;
*/
public async Task<string> GetMethod()
{
var apiSavedSearchCounts = new ApiResultModel<ApiSavedSearchCounts>();
var client = new HttpClient();
HttpResponseMessage response = await client.GetAsync("https://duda-api.newhomesource.com/api/v2/SavedSearches/GetClientCounts?");
if (response.IsSuccessStatusCode)
{
var jsonResponse = response.Content.ReadAsStringAsync().Result;
//Uncomment this line below to parse the Api Result Object - Note: Some of the fields can be nulls
//apiSavedSearchCounts = JsonConvert.DeserializeObject<ApiResultModel<ApiSavedSearchCounts>>(jsonResponse);
//Replace return jsonResponse; to: return View(apiSavedSearchCounts);
//to pass the result object as model to the respective View
return jsonResponse;
}else{
return "No response";
}
}
public class ApiSavedSearchCounts
Response Information
ApiResultModelOfApiSavedSearchCounts
Name | Description | Type | Additional information |
---|---|---|---|
Time | string |
None. |
|
Error | Exception |
None. |
|
ErrorMessage | string |
None. |
|
Status | string |
None. |
|
Server | string |
None. |
|
Count | integer |
None. |
|
FavoriteCounts | ApiFavoriteCounts |
None. |
|
FavoriteFacets | ApiFavoriteFacets |
None. |
|
Result | ApiSavedSearchCounts |
None. |
|
VerboseLogger | List of IVerboseLogger |
None. |
GET
api/v2/SavedSearches/GetClientCounts?clientId={clientId}