Skip to content

Commit 73782b8

Browse files
committed
add doc for the new browse API
1 parent 98b3c5b commit 73782b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/Index.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ public class Index {
380380
if queryURL != "" {
381381
requestPath += "&"
382382
}
383-
384383
requestPath += "cursor=\(cursor.urlEncode())"
385384
}
386385

@@ -401,6 +400,11 @@ public class Index {
401400
}
402401
}
403402

403+
/// Browse all index content.
404+
/// At the end of the block handler, call the method `next()` of the iterator object to get the next page.
405+
/// The parameter `end` is set to true when all the index was browsed.
406+
///
407+
/// :param: query The query parameters for the browse.
404408
public func browse(query: Query, block: BrowseIteratorHandler) {
405409
let iterator = BrowseIterator(index: self, query: query, block: block)
406410
iterator.next() // first call

0 commit comments

Comments
 (0)