@@ -20,6 +20,7 @@ A simple unofficial JustWatch Python API which uses [`GraphQL`](https://graphql.
20
20
* [ Details] ( #details )
21
21
* [ Offers for countries] ( #offers-for-countries )
22
22
* [ Return data structures] ( #return-data-structures )
23
+ * [ Locale, language, country] ( #locale-language-country )
23
24
* [ Disclaimer] ( #disclaimer )
24
25
25
26
@@ -65,10 +66,10 @@ Only the first argument is required, it specifies a title to search.
65
66
| 4 | ` count ` | ` int ` | NO | ` 4 ` | Up to how many entries should be returned |
66
67
| 5 | ` best_only ` | ` bool ` | NO | ` True ` | Determines whether only best offers should be returned |
67
68
68
- ` country ` must be 2 -letter code, e.g. ` US ` , ` GB ` , ` FR ` .
69
+ ` country ` must be ** ISO 3166-1 alpha-2 ** 2 -letter code , e.g. ` US ` , ` GB ` , ` FR ` .
69
70
It should be uppercase, however lowercase codes are automatically converted to uppercase.
70
71
71
- ` language ` is also 2-letter code, lowercase, e.g. ` en ` , ` fr ` .
72
+ ` language ` is a ** ISO 639-1 ** (usually) 2-letter code, lowercase, e.g. ` en ` , ` fr ` .
72
73
73
74
` count ` determines ** up to** how many entries should be returned.
74
75
If JustWatch GraphQL API returns fewer entries, then this function will also return fewer values.
@@ -132,7 +133,7 @@ First two arguments are required - node ID, and set of countries.
132
133
| 3 | ` language ` | ` str ` | NO | ` "en" ` | Language of responses |
133
134
| 5 | ` best_only ` | ` bool ` | NO | ` True ` | Determines whether only best offers should be returned |
134
135
135
- Usage ` language ` and ` best_only ` arguments matches the [ ` search ` ] ( #search ) command.
136
+ Usage of ` language ` and ` best_only ` arguments matches the [ ` search ` ] ( #search ) command.
136
137
137
138
Returned value ` dict[str, list[Offer]] ` , where key is country given as argument and value is a list of [ ` Offer ` ] ( #return-data-structures ) tuples.
138
139
@@ -146,6 +147,22 @@ Detailed descriptions of all used data structures are available in the [document
146
147
147
148
148
149
150
+ ## Locale, language, country
151
+
152
+ Languages and countries are configured via ISO standard.
153
+ Countries are following ** ISO 3166-1 alpha-2** standard (2-letter codes, uppercase).
154
+ Languages are following ** ISO 639-1** standard (usually 2-letter codes, lowercase).
155
+
156
+ Language codes can also be country-specific, e.g. ` es-MX ` for Mexican Spanish, etc.
157
+ The country part ** must** be uppercase.
158
+
159
+ There is a list of supported locales in [ JustWatch ** REST API** documentation] ( https://apis.justwatch.com/docs/api/#tips ) .
160
+ Any combination of those languages and countries should work with this API as well.
161
+
162
+ If you provide unsupported language JustWatch API should default to english.
163
+
164
+
165
+
149
166
## Disclaimer
150
167
151
168
This API is in no way affiliated, associated, authorized, endorsed by, or in any way officially connected with JustWatch.
0 commit comments