|
9 | 9 | Most functions have a number of common arguments (in addition to function-specific |
10 | 10 | ones, like `title` to search for): |
11 | 11 |
|
12 | | -| Name | Description | |
13 | | -|-------------|-------------| |
14 | | -| `country` | 2-letter country code for which offers are selected, (e.g., `US`, \ |
| 12 | +| Name | Description | |
| 13 | +|------|-------------| |
| 14 | +| `country` | 2-letter country code for which offers are selected, (e.g., `US`, \ |
15 | 15 | `GB`, `DE`). | |
16 | | -| `language` | Code for language in responses. It consists of 2 lowercase letters \ |
| 16 | +| `language` | Code for language in responses. It consists of 2 lowercase letters \ |
17 | 17 | with optional uppercase alphanumeric suffix (e.g., `en`, `en-US`, \ |
18 | 18 | `de`, `de-CH1901`). | |
19 | 19 | | `best_only` | Whether to return only "best" offers for each provider instead of, \ |
|
22 | 22 | Functions returning data for multiple titles |
23 | 23 | ([`search`][simplejustwatchapi.justwatch.search], |
24 | 24 | [`popular`][simplejustwatchapi.justwatch.popular]) |
25 | | -also allow for specifying number of elements, basic pagination, and filtering for |
26 | | -specific providers: |
| 25 | +also allow for specifying number of elements, basic pagination, and additional |
| 26 | +filtering: |
27 | 27 |
|
28 | | -| Name | Description | |
29 | | -|-------------|-------------| |
30 | | -| `count` | How many entries should be returned. | |
31 | | -| `offset` | Basic "pagination". Offset for the first returned result, i.e. how \ |
| 28 | +| Name | Description | |
| 29 | +|------|-------------| |
| 30 | +| `count` | How many entries should be returned. | |
| 31 | +| `offset` | Basic "pagination". Offset for the first returned result, i.e. how \ |
32 | 32 | many first entries should be skipped. Everything is handled on API \ |
33 | 33 | side, this library isn't doing any filtering. | |
34 | 34 | | `providers` | Providers (like Netflix, Amazon Prime Video) for which offers should \ |
|
37 | 37 | of how you can get that value. | |
38 | 38 | | `min_release_year` | Minimum release year of returned titles. | |
39 | 39 | | `max_release_year` | Maximum release year of returned titles. | |
40 | | -| `object_types` | Types of objects to filter for, it seems that only `SHOW` and \ |
41 | | - `MOVIE` are useful, but it's not strictly enforced. Types like \ |
42 | | - `SHOW_EPISODE`, or `SHOW_SEASON` can be used but they seem to \ |
43 | | - return shows, the same as `SHOW` type. | |
| 40 | +| `object_types` | Types of objects to filter for. It seems that only `SHOW` and \ |
| 41 | + `MOVIE` are useful, but it's not strictly enforced. | |
44 | 42 |
|
45 | 43 | Each function can raise two exceptions: |
46 | 44 |
|
@@ -158,23 +156,34 @@ def search( |
158 | 156 | [simplejustwatchapi.justwatch.providers] function. |
159 | 157 |
|
160 | 158 | min_release_year (int | None): Minimum release year of returned titles. |
| 159 | +
|
161 | 160 | If `None` (the default value), no filtering is done. |
162 | 161 |
|
163 | 162 | max_release_year (int | None): Maximum release year of returned titles. |
| 163 | +
|
164 | 164 | If `None` (the default value), no filtering is done. |
165 | 165 |
|
166 | | - object_types (list[str] | str | None): Types of objects to filter for, it seems |
167 | | - that only `SHOW` and `MOVIE` are useful, but it's not strictly enforced. |
168 | | - Types like `SHOW_EPISODE`, or `SHOW_SEASON` can be used but they seem to |
169 | | - return shows, the same as `SHOW` type. If `None` (the default value), no |
170 | | - filtering is done. |
| 166 | + object_types (list[str] | str | None): Types of objects to filter for, like |
| 167 | + `SHOW` or `MOVIE`. |
| 168 | +
|
| 169 | + It seems that only `SHOW` and `MOVIE` are useful, but it's not strictly |
| 170 | + enforced. Types like `SHOW_EPISODE`, or `SHOW_SEASON` can be used, but they |
| 171 | + seem to return TV shows, same as `SHOW`. |
| 172 | +
|
| 173 | + While the type value is not enforced, it **must** be a valid type, otherwise |
| 174 | + API will respond with HTTP status code 422. |
| 175 | +
|
| 176 | + For single type it can be a single string, or a list with one string. |
| 177 | +
|
| 178 | + If `None` (the default value), no filtering is done. |
171 | 179 |
|
172 | 180 | Returns: |
173 | 181 | (list[MediaEntry]): List of tuples with details of search results. |
174 | 182 |
|
175 | 183 | Raises: |
176 | 184 | exceptions.JustWatchApiError: JSON response from API has internal errors, e.g., |
177 | 185 | due to invalid language or country code. |
| 186 | +
|
178 | 187 | exceptions.JustWatchHttpError: HTTP error occurred, e.g., JustWatch API |
179 | 188 | responded with non-`2xx` status code. |
180 | 189 |
|
@@ -272,18 +281,27 @@ def popular( |
272 | 281 | max_release_year (int | None): Maximum release year of returned titles. |
273 | 282 | If `None` (the default value), no filtering is done. |
274 | 283 |
|
275 | | - object_types (list[str] | str | None): Types of objects to filter for, it seems |
276 | | - that only `SHOW` and `MOVIE` are useful, but it's not strictly enforced. |
277 | | - Types like `SHOW_EPISODE`, or `SHOW_SEASON` can be used but they seem to |
278 | | - return shows, the same as `SHOW` type. If `None` (the default value), no |
279 | | - filtering is done. |
| 284 | + object_types (list[str] | str | None): Types of objects to filter for, like |
| 285 | + `SHOW` or `MOVIE`. |
| 286 | +
|
| 287 | + It seems that only `SHOW` and `MOVIE` are useful, but it's not strictly |
| 288 | + enforced. Types like `SHOW_EPISODE`, or `SHOW_SEASON` can be used, but they |
| 289 | + seem to return TV shows, same as `SHOW`. |
| 290 | +
|
| 291 | + While the type value is not enforced, it **must** be a valid type, otherwise |
| 292 | + API will respond with HTTP status code 422. |
| 293 | +
|
| 294 | + For single type it can be a single string, or a list with one string. |
| 295 | +
|
| 296 | + If `None` (the default value), no filtering is done. |
280 | 297 |
|
281 | 298 | Returns: |
282 | 299 | (list[MediaEntry]): List of tuples with details of popular titles. |
283 | 300 |
|
284 | 301 | Raises: |
285 | 302 | exceptions.JustWatchApiError: JSON response from API has internal errors, e.g., |
286 | 303 | due to invalid language or country code. |
| 304 | +
|
287 | 305 | exceptions.JustWatchHttpError: HTTP error occurred, e.g., JustWatch API |
288 | 306 | responded with non-`2xx` status code. |
289 | 307 |
|
@@ -362,6 +380,7 @@ def details( |
362 | 380 | Raises: |
363 | 381 | exceptions.JustWatchApiError: JSON response from API has internal errors, e.g., |
364 | 382 | due to invalid language or country code. |
| 383 | +
|
365 | 384 | exceptions.JustWatchHttpError: HTTP error occurred, e.g., JustWatch API |
366 | 385 | responded with non-`2xx` status code. |
367 | 386 |
|
@@ -411,6 +430,7 @@ def seasons( |
411 | 430 | Raises: |
412 | 431 | exceptions.JustWatchApiError: JSON response from API has internal errors, e.g., |
413 | 432 | due to invalid language or country code. |
| 433 | +
|
414 | 434 | exceptions.JustWatchHttpError: HTTP error occurred, e.g., JustWatch API |
415 | 435 | responded with non-`2xx` status code. |
416 | 436 |
|
@@ -461,6 +481,7 @@ def episodes( |
461 | 481 | Raises: |
462 | 482 | exceptions.JustWatchApiError: JSON response from API has internal errors, e.g., |
463 | 483 | due to invalid language or country code. |
| 484 | +
|
464 | 485 | exceptions.JustWatchHttpError: HTTP error occurred, e.g., JustWatch API |
465 | 486 | responded with non-`2xx` status code. |
466 | 487 |
|
@@ -530,6 +551,7 @@ def offers_for_countries( |
530 | 551 | Raises: |
531 | 552 | exceptions.JustWatchApiError: JSON response from API has internal errors, e.g., |
532 | 553 | due to invalid language or country code. |
| 554 | +
|
533 | 555 | exceptions.JustWatchHttpError: HTTP error occurred, e.g., JustWatch API |
534 | 556 | responded with non-`2xx` status code. |
535 | 557 |
|
|
0 commit comments