Skip to content

Commit 669f6d0

Browse files
Tweak "usage" page to match new docstrings
1 parent f908cc8 commit 669f6d0

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

docs/usage.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ones, like `title` to search for):
4040
| Name | Description |
4141
|-------------|-------------|
4242
| `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`). |
4444
| `best_only` | Whether to return only "best" offers for each provider instead of, e.g., separate offer for SD, HD, and 4K. |
4545

4646
Functions returning data for multiple titles
@@ -52,9 +52,16 @@ specific providers:
5252
| Name | Description |
5353
|-------------|-------------|
5454
| `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. |
5656
| `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.
5757

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. |
64+
5865

5966
### Search for a title
6067

0 commit comments

Comments
 (0)