async function getVideos(buildType, allVideos = false) {
  const apiKey = getYouTubeAPIKey();
  if (!apiKey) {
    const msg = `${chalk.cyan('getVideos')} failed,`;
    // If the build type is production, abort with critical failure.
    if (buildType === 'production') {
      gutil.log(' ', chalk.red('ERROR:'), msg, 'required for production.');
      return 'youtubeAPIKey not found.';
    }
    gutil.log(' ', chalk.yellow('Oops:'), msg, 'using placeholder videos.');

    return VIDEO_COLLECTION_PLACEHOLDER;
  }

  const videos = [];
  const playlistId = CHROME_DEV_UPLOAD_PLAYLIST_ID;
  const youtube = google.youtube({version: YT_API_VERSION, auth: apiKey});
  const opts = {
    maxResults: YT_MAX_VIDEOS_PER_PAGE,
    part: 'id,snippet',
    playlistId,
  };

  if (allVideos) {
    let pageToken = null;
    do {
      const resp = await youtube.playlistItems.list(
        Object.assign({}, opts, {type: 'video', maxResults: 50, pageToken}));
      videos.push(...resp.data.items);
      pageToken = resp.data.nextPageToken;
    } while (pageToken);
  } else {
    try {
      const response = await youtube.playlistItems.list(opts);
      videos.push(...response.data.items);
    } catch (err) {
      gutil.log(' ', 'Error, unable to retrieve playlist', err);
      throw err;
    }
  }

  return videos;
}
Gets the Data feed from YouTube.

@param {string} buildType If build type is production, and it can read the
    API key, the function will fail.
@param {boolean=} allVideos If true, returns all videos in the playlist.
    Default: false.
@return {Promise<Array>} Array of videos.