Skip to content

Commit

Permalink
Warn that Client usage is deprecated (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
jparise authored Apr 9, 2024
1 parent 89f3a2f commit c3339b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vesta/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from __future__ import annotations

import json
import warnings
from typing import Any
from typing import Dict
from typing import List
Expand Down Expand Up @@ -60,6 +61,12 @@ def __init__(
base_url: str = "https://platform.vestaboard.com",
headers: Optional[Mapping[str, str]] = None,
):
warnings.warn(
"Vestaboard has deprecated the Platform API (Client). "
"Consider using the Subscription API (SubscrptionClient) instead.",
DeprecationWarning,
)

self.http = http_client or httpx.Client()
self.http.base_url = httpx.URL(base_url)
self.http.headers["X-Vestaboard-Api-Key"] = api_key
Expand Down
1 change: 1 addition & 0 deletions tests/test_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def vbml_client():
return VBMLClient()


@pytest.mark.filterwarnings("ignore:Vestaboard has deprecated the Platform API")
class TestClient:
def test_base_url(self):
base_url = "https://www.example.com"
Expand Down

0 comments on commit c3339b0

Please sign in to comment.