I'm looking to modify YouTube API Apps Script to allow comma separated values in a prompted; or alternative method.
I have been learning how to pull data from the YouTube API through Apps Script using the following example: https://developers.google.com/youtube/v3/quickstart/apps-script
I am able to execute the code but now I'm looking to learn how to be able to add multiple string values to the prompt. In the example, you add a channel name (string) and it will output an ID and view count. I would like to see how you can allow the script to take multiple values.
Add: RedBull, JimmyKimmelLive, ESPN as an example. I believe the call needs to be modified in the below code with the getResponseText. Although, I'm not sure if you would have to call it a different way to allow more than one value.
var ui = SpreadsheetApp.getUi();
var channelName = ui.prompt("Enter the channel name: ").getResponseText();
channelsListByUsername('snippet,contentDetails,statistics',
{'forUsername': channelName});