Skip to content

Commit c51c7a3

Browse files
Tweak docs
1 parent 49559f3 commit c51c7a3

4 files changed

Lines changed: 24 additions & 22 deletions

File tree

docs/caveats.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ it doesn't seem to be comprehensive.
5353

5454
### Country
5555

56-
Required pattern is two uppercase letters:
56+
Required pattern is two uppercase letters (e.g., `US`, `DE`, `GB`):
5757
```regex
5858
^[A-Z]{2}$
5959
```
6060

6161
It looks like **ISO 3166-1 alpha-2** standard.
6262

63-
API expects only uppercase letters, however this library will automatically convert
64-
country codes to uppercase.
63+
!!! tip "Country code letter case"
64+
API expects only uppercase letters, however this library will automatically convert
65+
country codes to uppercase.
6566

6667
If country code doesn't match the regex, or isn't a valid code the API will respond
6768
with an internal error and [`JustWatchApiError`]
@@ -70,17 +71,18 @@ with an internal error and [`JustWatchApiError`]
7071

7172
### Language
7273

73-
Required pattern is 2 lowercase letters with optional alphanumeric suffix after `-`.
74+
Required pattern is 2 lowercase letters with optional
75+
alphanumeric suffix after `-` (e.g., `en`, `en-US`, `fr`, `de`, `de-CH`, `de-CH1901`).
7476
The sufix must be uppercase:
7577
```
7678
^[a-z]{2}(-[0-9A-Z]+)?$
7779
```
7880

79-
It looks like a subset of **IETF BCP 47**. The code isn't full BCP 47 as the suffix
80-
allows only for numbers and uppercase letters.
81+
It looks similar to **IETF BCP 47** standard.
8182

82-
**The provided language isn't modified at all by this library, so it must match the
83-
regex exactly, including letter case.**
83+
!!! warning "Language code letter case"
84+
The provided language isn't modified at all by this library, so it must match the
85+
regex exactly, including letter case.
8486

8587
If language code doesn't match the expected regex the API will respond with an internal
8688
error and [`JustWatchApiError`][simplejustwatchapi.exceptions.JustWatchApiError] will be

docs/index.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ icon: lucide/circle-play
99
However, the main functionality should be (more or less) correct.
1010

1111
A simple unofficial JustWatch Python API which uses [`GraphQL`](https://graphql.org/)
12-
to access JustWatch data, built with [`httpx`](https://www.python-httpx.org/) and
13-
Python `3.11+`.
12+
to access [JustWatch](https://www.justwatch.com/) data, built with
13+
[`httpx`](https://www.python-httpx.org/) and available for Python `3.11+`.
1414

15-
This project is managed by [uv](https://docs.astral.sh/uv/).
15+
This library is published as a
16+
[Python package on PyPi](https://pypi.org/project/simple-justwatch-python-api/).
1617

1718

1819

1920
## Functions
2021

21-
This library provides multiple functions for accessing JustWatch:
22+
This library provides multiple ways of accessing JustWatch:
2223

23-
- `search` - search for entries based on title
24-
- `popular` - get a list of currently popular titles
25-
- `details` - get details for a title based on its ID
26-
- `seasons` - get information about all seasons of a show
27-
- `episodes` - get information about all episodes of a season
28-
- `offers_for_countries` - get offers for a title based on its ID for multiple
29-
countries
30-
- `providers` - get data about all available providers (like Netflix) in a country
24+
- Search for a title.
25+
- Get currently popular titles.
26+
- Get details of a specific entry based on ID.
27+
- Get information about all seasons of a show.
28+
- Get information about all episodes of a season.
29+
- Get offers for a title for multiple countries.
30+
- Get data about all available providers (such as Netflix) in a country.
3131

3232
All needed functions, data structures, raised exceptions are available through single
3333
module `simplejustwatchapi`.

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ones, like `node_id`, or `title` to search for):
4242

4343
Functions returning data for multiple titles
4444
([`search`][simplejustwatchapi.justwatch.search],
45-
[`details`][simplejustwatchapi.justwatch.details])
45+
[`popular`][simplejustwatchapi.justwatch.popular])
4646
also allow for specifying number of elements, basic pagination, and filtering for
4747
specific providers:
4848

src/simplejustwatchapi/justwatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def search(
101101
It can also contain alphanumeric (in uppercase) suffix after `-` symbol, most
102102
likely used for regional variants (e.g., `en-US`, `de-CH`).
103103
It looks like a subset of IETF BCP 47, however the suffix can contain only uppercase
104-
letters and numbers. It's value isn't normalized and **must** be provided in
104+
letters and numbers. Its value isn't normalized and **must** be provided in
105105
expected format, including letter case.
106106
107107
Returns a list of entries up to `count`.

0 commit comments

Comments
 (0)