Skip to content

Commit 875a58d

Browse files
authored
Merge pull request #448 from splunk/documentation-updates
Documentation changes
2 parents fa7b2a8 + f49d37c commit 875a58d

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
@@ -799,9 +799,6 @@ def request(self, path_segment, method="GET", headers=None, body={},
799799
:type app: ``string``
800800
:param sharing: The sharing mode of the namespace (optional).
801801
:type sharing: ``string``
802-
:param query: All other keyword arguments, which are used as query
803-
parameters.
804-
:type query: ``string``
805802
:return: The response from the server.
806803
:rtype: ``dict`` with keys ``body``, ``headers``, ``reason``,
807804
and ``status``

splunklib/client.py

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

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)