Table of Contents

Class YouTubeHelper

Namespace
SunamoYouTube
Assembly
SunamoYouTube.dll

YouTube Data API v3 helper: create playlists and manage video codes. Relies on the Google APIs Client Library for .NET, v1.7.0 or higher. See https://developers.google.com/api-client-library/dotnet/get_started

public static class YouTubeHelper
Inheritance
YouTubeHelper
Inherited Members

Methods

CreateNewPlaylist(string, string, List<string>)

Creates a new public YouTube playlist and adds videos to it. Note: This will create a new playlist even if one with the same name already exists.

public static Task CreateNewPlaylist(string filePath, string playlistName, List<string> list)

Parameters

filePath string

Path to the YouTube API client secrets JSON file.

playlistName string

Name of the new playlist to create.

list List<string>

List of YouTube video codes to add to the playlist.

Returns

Task

GetYtCodesFromUri(List<string>)

Extracts YouTube video codes from a list of URIs. Modifies the list directly.

public static List<string> GetYtCodesFromUri(List<string> list)

Parameters

list List<string>

List of URIs or video codes to process.

Returns

List<string>

The same list with URIs replaced by their video codes.