You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ ones, like `title` to search for):
40
40
| Name | Description |
41
41
|-------------|-------------|
42
42
|`country`| 2-letter country code for which offers will be returned, e.g., `US`, `GB`, `DE`. |
43
-
|`language`|Language code for responses' language. It can be just basic 2-letter code (e.g., `en`, `de`) or with a IETF BCP 47 suffix (e.g., `en-US`, `de-CH1901`). I don't think this is exactly IETF BCP 47, as the suffix can contain only uppercase letters and numbers. |
43
+
|`language`|Code for language in responses. It consists of 2 lowercase letters with optional uppercase alphanumeric suffix (e.g., `en`, `en-US`, `de`, `de-CH1901`). |
44
44
|`best_only`| Whether to return only "best" offers for each provider instead of, e.g., separate offer for SD, HD, and 4K. |
45
45
46
46
Functions returning data for multiple titles
@@ -52,9 +52,16 @@ specific providers:
52
52
| Name | Description |
53
53
|-------------|-------------|
54
54
|`count`| How many entries should be returned. |
55
-
|`offset`| Basic "pagination", how many first elements should be skipped. Everything is handled on API side, this library isn't doing any filtering. |
55
+
|`offset`| Basic "pagination". Offset for the first returned result, i.e. how many first entries should be skipped. Everything is handled on API side, this library isn't doing any filtering. |
56
56
| `providers` | Providers (like Netflix, Amazon Prime Video) for which offers should returned. Requires 3-letter "short name". Check [Provider codes](caveats.md#provider-codes) page for an example of how you can get that value.
57
57
58
+
Each function can raise two exceptions:
59
+
60
+
| Exception | Cause |
61
+
|-----------|-------|
62
+
|[`JustWatchHttpError`][simplejustwatchapi.exceptions.JustWatchHttpError]| JustWatch API responded with non-`2xx` code. |
63
+
|[`JustWatchApiError`][simplejustwatchapi.exceptions.JustWatchApiError]| JSON response from JustWatch API contains errors (e.g., due to invalid language or country code). If this exception is raised, then API responded with `2xx` code. |
0 commit comments