Skip to content

Commit de2ae04

Browse files
Rename main module name to "simplejustwatchapi"
1 parent 72ec00a commit de2ae04

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

.github/workflows/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ jobs:
2828
python -m pip install coveralls
2929
- name: Checking coverage
3030
run: |
31-
coverage run --source=simplejustwatchpythonapi -m pytest test/
31+
coverage run --source=simplejustwatchapi -m pytest test/
3232
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_TOKEN }} coveralls

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pip install simple-justwatch-python-api
2525

2626
Currently, there's only one function available - search JustWatch:
2727
```python
28-
from simplejustwatchpythonapi.justwatch import search
28+
from simplejustwatchapi.justwatch import search
2929

3030
results = search("title", "US", "en", 5, True)
3131
```

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
setup(
88
name="simple-justwatch-python-api",
9-
packages=["simplejustwatchpythonapi"],
10-
package_dir={"simplejustwatchpythonapi": "src/simplejustwatchpythonapi"},
9+
packages=["simplejustwatchapi"],
10+
package_dir={"simplejustwatchapi": "src/simplejustwatchapi"},
1111
version="0.4",
1212
license="GPLv3",
1313
description="A simple JustWatch Python API",

src/simplejustwatchapi/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from simplejustwatchapi.justwatch import search
2+
from simplejustwatchapi.parser import MediaEntry, Offer

src/simplejustwatchpythonapi/justwatch.py renamed to src/simplejustwatchapi/justwatch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from httpx import post
22

3-
from simplejustwatchpythonapi.parser import MediaEntry, parse_search_response
4-
from simplejustwatchpythonapi.requests import prepare_search_request
3+
from simplejustwatchapi.parser import MediaEntry, parse_search_response
4+
from simplejustwatchapi.requests import prepare_search_request
55

66
_GRAPHQL_API_URL = "https://apis.justwatch.com/graphql"
77

File renamed without changes.
File renamed without changes.

src/simplejustwatchpythonapi/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/simplejustwatchpythonapi/test_justwatch.py renamed to test/simplejustwatchapi/test_justwatch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest.mock import MagicMock, patch
22

3-
from simplejustwatchpythonapi.justwatch import search
3+
from simplejustwatchapi.justwatch import search
44

55
JUSTWATCH_GRAPHQL_URL = "https://apis.justwatch.com/graphql"
66
SEARCH_INPUT = ("TITLE", "COUNTRY", "LANGUAGE", 5, True)
@@ -9,9 +9,9 @@
99
DUMMY_ENTRIES = [MagicMock(), MagicMock(), None]
1010

1111

12-
@patch("simplejustwatchpythonapi.justwatch.post")
13-
@patch("simplejustwatchpythonapi.justwatch.parse_search_response", return_value=DUMMY_ENTRIES)
14-
@patch("simplejustwatchpythonapi.justwatch.prepare_search_request", return_value=DUMMY_REQUEST)
12+
@patch("simplejustwatchapi.justwatch.post")
13+
@patch("simplejustwatchapi.justwatch.parse_search_response", return_value=DUMMY_ENTRIES)
14+
@patch("simplejustwatchapi.justwatch.prepare_search_request", return_value=DUMMY_REQUEST)
1515
def test_search(requests_mock, parser_mock, httpx_mock) -> None:
1616
httpx_mock().json.return_value = DUMMY_RESPONSE
1717

test/simplejustwatchpythonapi/test_parser.py renamed to test/simplejustwatchapi/test_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from simplejustwatchpythonapi.parser import MediaEntry, Offer, parse_search_response
1+
from simplejustwatchapi.parser import MediaEntry, Offer, parse_search_response
22

33
DETAILS_URL = "https://justwatch.com"
44
IMAGES_URL = "https://images.justwatch.com"

0 commit comments

Comments
 (0)