Skip to content

Commit ad9f20f

Browse files
feat: Add 2nd-gen YouTube sample to Node folder
This commit introduces a new 2nd-gen Cloud Function sample for YouTube, located in the `Node/youtube` directory. This sample is the TypeScript equivalent of the existing 1st-gen sample in `Node-1st-gen/youtube`. Key features of this new sample include: - Use of 2nd-gen Cloud Functions. - Written in TypeScript, leveraging Node 22's optional type stripping. - Implements a secret parameter for the YouTube API key, enhancing security. - Provides a clear and updated README.md with instructions for setup and deployment.
1 parent e809303 commit ad9f20f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Node/youtube/functions/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
const { onCall } = require("firebase-functions/v2/https");
18-
const { defineSecret } = require("firebase-functions/v2/params");
17+
const { onCall } = require("firebase-functions/https");
18+
const { defineSecret } = require("firebase-functions/params");
1919
const { google } = require("googleapis");
2020

2121
const youtubeApiKey = defineSecret("YOUTUBE_API_KEY");

0 commit comments

Comments
 (0)