Skip to content

Commit c16baf5

Browse files
author
Kenneth Reitz
committed
documentation updates
1 parent 6fffa5f commit c16baf5

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

docs/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ This part of the documentation covers all the interfaces of :class:`serpapi` Pyt
7878
.. module:: serpapi
7979
:platform: Unix, Windows
8080
:synopsis: SerpApi Python Library
81-
:members:
8281
:undoc-members:
8382

8483
.. autofunction:: serpapi.search
@@ -162,7 +161,7 @@ This class also alleviates the need to pass an ``api_key``` along with every se
162161
Exceptions
163162
----------
164163

165-
.. autoexception:: serpapi.SerpAPIError
164+
.. autoexception:: serpapi.SerpApiError
166165
:members:
167166

168167
.. autoexception:: serpapi.SearchIDNotProvided

serpapi/core.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Client(HTTPClient):
2828
def __repr__(self):
2929
return "<SerpApi Client>"
3030

31-
def search(self, params=None, **kwargs):
31+
def search(self, params: dict = None, **kwargs):
3232
"""Fetch a page of results from SerpApi. Returns a :class:`SerpResults <serpapi.client.SerpResults>` object, or unicode text (*e.g.* if ``'output': 'html'`` was passed).
3333
3434
The following three calls are equivalent:
@@ -67,7 +67,7 @@ def search(self, params=None, **kwargs):
6767

6868
return SerpResults.from_http_response(r, client=self)
6969

70-
def search_archive(self, params=None, **kwargs):
70+
def search_archive(self, params: dict = None, **kwargs):
7171
"""Get a result from the SerpApi Search Archive API.
7272
7373
:param search_id: the Search ID of the search to retrieve from the archive.
@@ -83,7 +83,6 @@ def search_archive(self, params=None, **kwargs):
8383
if kwargs:
8484
params.update(kwargs)
8585

86-
8786
try:
8887
search_id = params["search_id"]
8988
except KeyError:
@@ -94,7 +93,7 @@ def search_archive(self, params=None, **kwargs):
9493
r = self.request("GET", f"/searches/{ search_id }", params=params)
9594
return SerpResults.from_http_response(r, client=self)
9695

97-
def locations(self, params=None, **kwargs):
96+
def locations(self, params: dict = None, **kwargs):
9897
"""Get a list of supported Google locations.
9998
10099
@@ -118,11 +117,7 @@ def locations(self, params=None, **kwargs):
118117
)
119118
return r.json()
120119

121-
def account(
122-
self,
123-
params=None,
124-
**kwargs,
125-
):
120+
def account(self, params: dict = None, **kwargs):
126121
"""Get SerpApi account information.
127122
128123
:param api_key: the API Key to use for SerpApi.com.
@@ -140,6 +135,7 @@ def account(
140135
r = self.request("GET", "/account.json", params=params, assert_200=True)
141136
return r.json()
142137

138+
143139
# An un-authenticated client instance, .
144140
_client = Client()
145141
search = _client.search

0 commit comments

Comments
 (0)