Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Add TotalResult to QueryResponse #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ QueryMetadata used to decode the JSON response metadata from Insights

```go
type QueryResponse struct {
Results []map[string]interface{} `json:"results"`
Facets []map[string]interface{} `json:"facets"`
Metadata QueryMetadata `json:"metadata"`
Results []map[string]interface{} `json:"results"`
Facets []map[string]interface{} `json:"facets"`
TotalResult map[string]interface{} `json:"totalResult"`
Metadata QueryMetadata `json:"metadata"`
}
```

Expand Down
7 changes: 4 additions & 3 deletions client/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ type QueryClient struct {

// QueryResponse used to decode the JSON response from Insights
type QueryResponse struct {
Results []map[string]interface{} `json:"results"`
Facets []map[string]interface{} `json:"facets"`
Metadata QueryMetadata `json:"metadata"`
Results []map[string]interface{} `json:"results"`
Facets []map[string]interface{} `json:"facets"`
TotalResult map[string]interface{} `json:"totalResult"`
Metadata QueryMetadata `json:"metadata"`
}

// QueryMetadata used to decode the JSON response metadata from Insights
Expand Down