Skip to content

Commit b0279da

Browse files
authored
Firebase ML changed endpoint (#813)
1 parent eabe9ba commit b0279da

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/machine-learning/machine-learning-api-client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import * as utils from '../utils/index';
2121
import * as validator from '../utils/validator';
2222
import { FirebaseApp } from '../firebase-app';
2323

24-
const ML_V1BETA1_API = 'https://mlkit.googleapis.com/v1beta1';
24+
const ML_V1BETA2_API = 'https://firebaseml.googleapis.com/v1beta2';
2525
const FIREBASE_VERSION_HEADER = {
2626
'X-Firebase-Client': 'fire-admin-node/<XXX_SDK_VERSION_XXX>',
2727
};
@@ -253,7 +253,7 @@ export class MachineLearningApiClient {
253253
private getUrl(): Promise<string> {
254254
return this.getProjectIdPrefix()
255255
.then((projectIdPrefix) => {
256-
return `${ML_V1BETA1_API}/${this.projectIdPrefix}`;
256+
return `${ML_V1BETA2_API}/${this.projectIdPrefix}`;
257257
});
258258
}
259259

test/unit/machine-learning/machine-learning-api-client.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const expect = chai.expect;
3232

3333
describe('MachineLearningApiClient', () => {
3434

35-
const BASE_URL = 'https://mlkit.googleapis.com/v1beta1';
35+
const BASE_URL = 'https://firebaseml.googleapis.com/v1beta2';
3636

3737
const MODEL_ID = '1234567';
3838
const MODEL_RESPONSE = {

0 commit comments

Comments
 (0)