Skip to content

Commit ae35741

Browse files
authored
docs: update region tag prefix to fb_functions_ (firebase#127)
1 parent 206ed04 commit ae35741

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

functions-next/callable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
export function callAddMessage(firebaseApp) {
55
const messageText = "Hello, World!";
66

7-
// [START functions_call_add_message]
7+
// [START fb_functions_call_add_message]
88
const { getFunctions, httpsCallable } = require("firebase/functions");
99

1010
const functions = getFunctions(firebaseApp);
@@ -16,13 +16,13 @@ export function callAddMessage(firebaseApp) {
1616
const data = result.data;
1717
const sanitizedMessage = data.text;
1818
});
19-
// [END functions_call_add_message]
19+
// [END fb_functions_call_add_message]
2020
}
2121

2222
export function callAddMessageError(firebaseApp) {
2323
const messageText = "Hello, World!";
2424

25-
// [START functions_call_add_message_error]
25+
// [START fb_functions_call_add_message_error]
2626
const { getFunctions, httpsCallable } = require("firebase/functions");
2727

2828
const functions = getFunctions(firebaseApp);
@@ -41,5 +41,5 @@ export function callAddMessageError(firebaseApp) {
4141
const details = error.details;
4242
// ...
4343
});
44-
// [END functions_call_add_message_error]
44+
// [END fb_functions_call_add_message_error]
4545
}

functions-next/emulator-suite.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ initializeApp({
1010
});
1111

1212
export function emulatorSettings() {
13-
// [START functions_emulator_connect]
13+
// [START fb_functions_emulator_connect]
1414
const { getApp } = require("firebase/app");
1515
const { getFunctions, useFunctionsEmulator } = require("firebase/functions");
1616

1717
const functions = getFunctions(getApp());
1818
useFunctionsEmulator(functions, "localhost", 5001);
19-
// [END functions_emulator_connect]
19+
// [END fb_functions_emulator_connect]
2020
}
2121

2222
export async function callFunction() {
23-
// [START functions_callable_call]
23+
// [START fb_functions_callable_call]
2424
const { getApp } = require("firebase/app");
2525
const { getFunctions, httpsCallable } = require("firebase/functions");
2626

@@ -32,5 +32,5 @@ export async function callFunction() {
3232
const data = result.data;
3333
const sanitizedMessage = data.text;
3434
// ...
35-
// [END functions_callable_call]
35+
// [END fb_functions_callable_call]
3636
}

functions/callable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import "firebase/functions";
44
function callAddMessage() {
55
const messageText = "Hello, World!";
66

7-
// [START functions_call_add_message]
7+
// [START fb_functions_call_add_message]
88
var addMessage = firebase.functions().httpsCallable('addMessage');
99
addMessage({ text: messageText })
1010
.then((result) => {
1111
// Read result of the Cloud Function.
1212
var sanitizedMessage = result.data.text;
1313
});
14-
// [END functions_call_add_message]
14+
// [END fb_functions_call_add_message]
1515
}
1616

1717
function callAddMessageError() {
1818
const messageText = "Hello, World!";
1919

20-
// [START functions_call_add_message_error]
20+
// [START fb_functions_call_add_message_error]
2121
var addMessage = firebase.functions().httpsCallable('addMessage');
2222
addMessage({ text: messageText })
2323
.then((result) => {
@@ -31,5 +31,5 @@ function callAddMessageError() {
3131
var details = error.details;
3232
// ...
3333
});
34-
// [END functions_call_add_message_error]
34+
// [END fb_functions_call_add_message_error]
3535
}

functions/emulator-suite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import firebase from "firebase/app";
22
import "firebase/functions";
33

44
function emulatorSettings() {
5-
// [START functions_emulator_connect]
5+
// [START fb_functions_emulator_connect]
66
firebase.functions().useEmulator("localhost", 5001);
7-
// [END functions_emulator_connect]
7+
// [END fb_functions_emulator_connect]
88
}

snippets/functions-next/callable/functions_call_add_message.js renamed to snippets/functions-next/callable/fb_functions_call_add_message.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// To make edits to the snippets in this file, please edit the source
55

6-
// [START functions_call_add_message_modular]
6+
// [START fb_functions_call_add_message_modular]
77
import { getFunctions, httpsCallable } from "firebase/functions";
88

99
const functions = getFunctions(firebaseApp);
@@ -15,4 +15,4 @@ addMessage({ text: messageText })
1515
const data = result.data;
1616
const sanitizedMessage = data.text;
1717
});
18-
// [END functions_call_add_message_modular]
18+
// [END fb_functions_call_add_message_modular]

snippets/functions-next/callable/functions_call_add_message_error.js renamed to snippets/functions-next/callable/fb_functions_call_add_message_error.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// To make edits to the snippets in this file, please edit the source
55

6-
// [START functions_call_add_message_error_modular]
6+
// [START fb_functions_call_add_message_error_modular]
77
import { getFunctions, httpsCallable } from "firebase/functions";
88

99
const functions = getFunctions(firebaseApp);
@@ -22,4 +22,4 @@ addMessage({ text: messageText })
2222
const details = error.details;
2323
// ...
2424
});
25-
// [END functions_call_add_message_error_modular]
25+
// [END fb_functions_call_add_message_error_modular]

snippets/functions-next/emulator-suite/functions_callable_call.js renamed to snippets/functions-next/emulator-suite/fb_functions_callable_call.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// To make edits to the snippets in this file, please edit the source
55

6-
// [START functions_callable_call_modular]
6+
// [START fb_functions_callable_call_modular]
77
import { getApp } from "firebase/app";
88
import { getFunctions, httpsCallable } from "firebase/functions";
99

@@ -15,4 +15,4 @@ const result = await addMessage({ text: '<message text>'});
1515
const data = result.data;
1616
const sanitizedMessage = data.text;
1717
// ...
18-
// [END functions_callable_call_modular]
18+
// [END fb_functions_callable_call_modular]

snippets/functions-next/emulator-suite/functions_emulator_connect.js renamed to snippets/functions-next/emulator-suite/fb_functions_emulator_connect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
//
44
// To make edits to the snippets in this file, please edit the source
55

6-
// [START functions_emulator_connect_modular]
6+
// [START fb_functions_emulator_connect_modular]
77
import { getApp } from "firebase/app";
88
import { getFunctions, useFunctionsEmulator } from "firebase/functions";
99

1010
const functions = getFunctions(getApp());
1111
useFunctionsEmulator(functions, "localhost", 5001);
12-
// [END functions_emulator_connect_modular]
12+
// [END fb_functions_emulator_connect_modular]

0 commit comments

Comments
 (0)