Skip to content

Commit e49add8

Browse files
authored
Firebase ML Changing service endpoint (#421)
1 parent bcefca8 commit e49add8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

firebase_admin/ml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ def _validate_page_token(page_token):
771771
class _MLService:
772772
"""Firebase ML service."""
773773

774-
PROJECT_URL = 'https://mlkit.googleapis.com/v1beta1/projects/{0}/'
775-
OPERATION_URL = 'https://mlkit.googleapis.com/v1beta1/'
774+
PROJECT_URL = 'https://firebaseml.googleapis.com/v1beta2/projects/{0}/'
775+
OPERATION_URL = 'https://firebaseml.googleapis.com/v1beta2/'
776776
POLL_EXPONENTIAL_BACKOFF_FACTOR = 1.5
777777
POLL_BASE_WAIT_TIME_SECONDS = 3
778778

tests/test_ml.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
from tests import testutils
2525

2626

27-
BASE_URL = 'https://mlkit.googleapis.com/v1beta1/'
27+
BASE_URL = 'https://firebaseml.googleapis.com/v1beta2/'
2828
PROJECT_ID = 'my-project-1'
29+
2930
PAGE_TOKEN = 'pageToken'
3031
NEXT_PAGE_TOKEN = 'nextPageToken'
3132

@@ -306,7 +307,7 @@ def instrument_ml_service(status=200, payload=None, operations=False, app=None):
306307
app = firebase_admin.get_app()
307308
ml_service = ml._get_ml_service(app)
308309
recorder = []
309-
session_url = 'https://mlkit.googleapis.com/v1beta1/'
310+
session_url = 'https://firebaseml.googleapis.com/v1beta2/'
310311

311312
if isinstance(status, list):
312313
adapter = testutils.MockMultiRequestAdapter

0 commit comments

Comments
 (0)