File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55from httpx import post
66
7- from simplejustwatchapi .query import prepare_search_request , parse_search_response , MediaEntry
7+ from simplejustwatchapi .query import MediaEntry , parse_search_response , prepare_search_request
88
99_GRAPHQL_API_URL = "https://apis.justwatch.com/graphql"
1010
Original file line number Diff line number Diff line change 1- """Module responsible for creating GraphQL queries and parsing responses from JustWatch GraphQL API into NamedTuples.
1+ """Module responsible for creating GraphQL queries and parsing responses from JustWatch GraphQL API.
2+ Parsed responses are returned as Python NamedTuples for easier access.
23Currently only responses from "GetSearchTitles" query are supported.
34"""
45
@@ -88,6 +89,7 @@ class Offer(NamedTuple):
8889 """Parsed single offer from JustWatch GraphQL API for single entry.
8990 Doesn't match fully received response, some fields are simplified.
9091 """
92+
9193 monetization_type : str
9294 presentation_type : str
9395 url : str
@@ -103,6 +105,7 @@ class MediaEntry(NamedTuple):
103105 """Parsed response from JustWatch GraphQL API for "GetSearchTitles" query for single entry.
104106 Doesn't match fully received response, some fields are simplified.
105107 """
108+
106109 entry_id : str
107110 object_id : int
108111 object_type : str
You can’t perform that action at this time.
0 commit comments