Skip to content

Commit f49d37c

Browse files
committed
Documentation changes
updated the comments and changes for JSONResultsReader class to be added in the generated docs
1 parent f28dd7b commit f49d37c

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

docs/results.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ splunklib.results
55

66
.. autoclass:: Message
77

8-
.. autoclass:: ResultsReader
8+
.. autoclass:: JSONResultsReader

splunklib/binding.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,6 @@ def request(self, path_segment, method="GET", headers=None, body={},
800800
:type app: ``string``
801801
:param sharing: The sharing mode of the namespace (optional).
802802
:type sharing: ``string``
803-
:param query: All other keyword arguments, which are used as query
804-
parameters.
805-
:type query: ``string``
806803
:return: The response from the server.
807804
:rtype: ``dict`` with keys ``body``, ``headers``, ``reason``,
808805
and ``status``

splunklib/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3029,7 +3029,7 @@ def itemmeta(self):
30293029
def oneshot(self, query, **params):
30303030
"""Run a oneshot search and returns a streaming handle to the results.
30313031
3032-
The ``InputStream`` object streams XML fragments from the server. To parse this stream into usable Python
3032+
The ``InputStream`` object streams fragments from the server. To parse this stream into usable Python
30333033
objects, pass the handle to :class:`splunklib.results.JSONResultsReader` along with the query param
30343034
"output_mode='json'" ::
30353035

splunklib/results.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
accessing search results while avoiding buffering the result set, which can be
2424
very large.
2525
26-
To use the reader, instantiate :class:`ResultsReader` on a search result stream
26+
To use the reader, instantiate :class:`JSONResultsReader` on a search result stream
2727
as follows:::
2828
2929
reader = ResultsReader(result_stream)
@@ -55,7 +55,8 @@
5555

5656
__all__ = [
5757
"ResultsReader",
58-
"Message"
58+
"Message",
59+
"JSONResultsReader"
5960
]
6061

6162

@@ -308,11 +309,14 @@ class JSONResultsReader(object):
308309
:class:`Message` object for Splunk messages. This class has one field,
309310
``is_preview``, which is ``True`` when the results are a preview from a
310311
running search, or ``False`` when the results are from a completed search.
312+
311313
This function has no network activity other than what is implicit in the
312314
stream it operates on.
313-
:param `stream`: The stream to read from (any object that supports
314-
``.read()``).
315+
316+
:param `stream`: The stream to read from (any object that supports``.read()``).
317+
315318
**Example**::
319+
316320
import results
317321
response = ... # the body of an HTTP response
318322
reader = results.JSONResultsReader(response)

0 commit comments

Comments
 (0)