Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Commit 31e6ee5

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents e37c71c + a373896 commit 31e6ee5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

BlockV/Classes/Helpers/DiscoverQueryBuilder.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public class DiscoverQueryBuilder {
9090

9191
/// Sets the scope of the search query.
9292
///
93+
/// A scope must alway be supplied. Scopes are defined using a `key` and `value`.
94+
/// The key specifies the property of the vAtom to search. The value is the search term.
95+
///
9396
/// - Parameters:
9497
/// - scope: Search field.
9598
/// - value: Value for lookup.
@@ -99,6 +102,11 @@ public class DiscoverQueryBuilder {
99102

100103
/// Adds a defined filter element to the query.
101104
///
105+
/// Filter elements, similar to scopes, are defined using a `field` and `value`. However, filters
106+
/// offer more flexibility because they allow a *filter operator* to be supplied, e.g. `Gt` which
107+
/// filters those vAtoms whose value is greater than the supplied `value`. The combine operator is
108+
/// applied *between* filter elements.
109+
///
102110
/// - Parameters:
103111
/// - field: Search field.
104112
/// - filterOperator: The operator to apply between the `field` and `value` items.
@@ -114,7 +122,7 @@ public class DiscoverQueryBuilder {
114122

115123
/// Adds a custom filter element to the query.
116124
///
117-
/// This method provides you with full control over the contents of the fileter element.
125+
/// This method provides you with full control over the contents of the filter element.
118126
///
119127
/// - Parameters:
120128
/// - field: Lookup field.
@@ -129,7 +137,11 @@ public class DiscoverQueryBuilder {
129137

130138
}
131139

132-
/// Optionally set the return structure.
140+
/// Sets the return type.
141+
///
142+
/// - Parameter type: Result `type` controls the response payload of the query
143+
/// - `*` returns vAtoms.
144+
/// - `count` returns only the numerical count of the query and an empty vAtom array.
133145
public func setReturn(type: ResultType) {
134146
self.resultStructure = ["type": type.rawValue]
135147
}

0 commit comments

Comments
 (0)