@@ -178,15 +178,15 @@ def prepare_search_request(
178178 title : str , country : str , language : str , count : int , best_only : bool
179179) -> dict :
180180 """Prepare search request for JustWatch GraphQL API.
181- Creates a " GetSearchTitles" GraphQL query.
181+ Creates a `` GetSearchTitles`` GraphQL query.
182182 Country code should be two uppercase letters, however it will be auto-converted to uppercase.
183183
184184 Args:
185185 title: title to search
186186 country: country to search for offers
187187 language: language of responses
188188 count: how many responses should be returned
189- best_only: return only best offers if True, return all offers if False
189+ best_only: return only best offers if `` True`` , return all offers if `` False``
190190
191191 Returns:
192192 JSON/dict with GraphQL POST body
@@ -211,14 +211,14 @@ def prepare_search_request(
211211
212212def parse_search_response (json : dict ) -> list [MediaEntry ]:
213213 """Parse response from search query from JustWatch GraphQL API.
214- Parses response for " GetSearchTitles" query.
214+ Parses response for `` GetSearchTitles`` query.
215215 If API didn't return any data, then an empty list is returned.
216216
217217 Args:
218218 json: JSON returned by JustWatch GraphQL API
219219
220220 Returns:
221- Parsed received JSON as a list of MediaEntry NamedTuples
221+ Parsed received JSON as a list of `` MediaEntry`` NamedTuples
222222 """
223223 nodes = json ["data" ]["popularTitles" ]["edges" ]
224224 entries = [_parse_entry (node ["node" ]) for node in nodes ]
@@ -227,14 +227,14 @@ def parse_search_response(json: dict) -> list[MediaEntry]:
227227
228228def prepare_details_request (node_id : str , country : str , language : str , best_only : bool ) -> dict :
229229 """Prepare a details request for specified node ID to JustWatch GraphQL API.
230- Creates a " GetTitleNode" GraphQL query.
230+ Creates a `` GetTitleNode`` GraphQL query.
231231 Country code should be two uppercase letters, however it will be auto-converted to uppercase.
232232
233233 Args:
234234 node_id: node ID of entry to get details for
235235 country: country to search for offers
236236 language: language of responses
237- best_only: return only best offers if True, return all offers if False
237+ best_only: return only best offers if `` True`` , return all offers if `` False``
238238
239239 Returns:
240240 JSON/dict with GraphQL POST body
@@ -258,16 +258,16 @@ def prepare_details_request(node_id: str, country: str, language: str, best_only
258258
259259def parse_details_response (json : any ) -> MediaEntry | None :
260260 """Parse response from details query from JustWatch GraphQL API.
261- Parses response for " GetTitleNode" query.
261+ Parses response for `` GetTitleNode`` query.
262262 If API responded with an internal error (mostly due to not found node ID),
263- then " None" will be returned instead.
263+ then `` None`` will be returned instead.
264264
265265 Args:
266266 json: JSON returned by JustWatch GraphQL API
267267
268268 Returns:
269- Parsed received JSON as a MediaEntry NamedTuple,
270- or None in case data for a given node ID was not found
269+ Parsed received JSON as a `` MediaEntry`` NamedTuple,
270+ or `` None`` in case data for a given node ID was not found
271271 """
272272 return _parse_entry (json ["data" ]["node" ]) if "errors" not in json else None
273273
0 commit comments