sharpapi 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sharpapi-0.2.0 → sharpapi-0.2.1}/PKG-INFO +1 -2
- {sharpapi-0.2.0 → sharpapi-0.2.1}/README.md +0 -1
- {sharpapi-0.2.0 → sharpapi-0.2.1}/pyproject.toml +1 -1
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/__init__.py +1 -1
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/async_client.py +0 -5
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/client.py +0 -5
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/test_client.py +0 -9
- {sharpapi-0.2.0 → sharpapi-0.2.1}/.github/workflows/publish.yml +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/.github/workflows/test.yml +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/.gitignore +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/_base.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/_utils.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/exceptions.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/models.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/py.typed +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/src/sharpapi/streaming.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/__init__.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/conftest.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/test_async_client.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/test_dataframe.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/test_models.py +0 -0
- {sharpapi-0.2.0 → sharpapi-0.2.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sharpapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Official Python SDK for the SharpAPI real-time sports betting odds API
|
|
5
5
|
Project-URL: Homepage, https://sharpapi.io
|
|
6
6
|
Project-URL: Documentation, https://docs.sharpapi.io/sdks/python
|
|
@@ -118,7 +118,6 @@ client.sports.list()
|
|
|
118
118
|
client.leagues.list(sport="basketball")
|
|
119
119
|
client.sportsbooks.list()
|
|
120
120
|
client.events.list(league="nba", live=True)
|
|
121
|
-
client.events.search("Lakers")
|
|
122
121
|
|
|
123
122
|
# Account
|
|
124
123
|
client.account.me() # Tier, limits, features
|
|
@@ -442,11 +442,6 @@ class _AsyncEventsResource:
|
|
|
442
442
|
raw = data.get("data", data)
|
|
443
443
|
return Event.model_validate(raw)
|
|
444
444
|
|
|
445
|
-
async def search(self, query: str) -> APIResponse[list[Event]]:
|
|
446
|
-
"""Search events by name."""
|
|
447
|
-
data = await self._client._get("/events/search", {"q": query})
|
|
448
|
-
return parse_response(data, Event)
|
|
449
|
-
|
|
450
445
|
|
|
451
446
|
class _AsyncAccountResource:
|
|
452
447
|
def __init__(self, client: AsyncSharpAPI):
|
|
@@ -555,11 +555,6 @@ class _EventsResource:
|
|
|
555
555
|
raw = data.get("data", data)
|
|
556
556
|
return Event.model_validate(raw)
|
|
557
557
|
|
|
558
|
-
def search(self, query: str) -> APIResponse[list[Event]]:
|
|
559
|
-
"""Search events by name."""
|
|
560
|
-
data = self._client._get("/events/search", {"q": query})
|
|
561
|
-
return _parse_response(data, Event)
|
|
562
|
-
|
|
563
558
|
|
|
564
559
|
class _AccountResource:
|
|
565
560
|
def __init__(self, client: SharpAPI):
|
|
@@ -346,15 +346,6 @@ class TestReferenceResources:
|
|
|
346
346
|
result = client.events.list(league="nba")
|
|
347
347
|
assert len(result.data) == 1
|
|
348
348
|
|
|
349
|
-
@respx.mock
|
|
350
|
-
def test_events_search(self):
|
|
351
|
-
respx.get(f"{BASE_URL}/api/v1/events/search").mock(
|
|
352
|
-
return_value=Response(200, json=EVENTS_RESPONSE)
|
|
353
|
-
)
|
|
354
|
-
with SharpAPI(API_KEY) as client:
|
|
355
|
-
result = client.events.search("Lakers")
|
|
356
|
-
assert len(result.data) == 1
|
|
357
|
-
|
|
358
349
|
@respx.mock
|
|
359
350
|
def test_account_me(self):
|
|
360
351
|
respx.get(f"{BASE_URL}/api/v1/account").mock(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|