Table of Contents

Class UriWebServices.YouTube

Namespace
SunamoUriWebServices
Assembly
SunamoUriWebServices.dll

Provides YouTube URL building methods.

public static class UriWebServices.YouTube
Inheritance
UriWebServices.YouTube
Inherited Members

Fields

YtVideoStart

YouTube video URL prefix.

public const string YtVideoStart = "https://www.youtube.com/watch?v="

Field Value

string

Methods

GetHtmlAnchor(string)

Gets HTML anchor element for the specified YouTube video code.

public static string GetHtmlAnchor(string videoCode)

Parameters

videoCode string

The YouTube video code.

Returns

string

An HTML anchor element linking to the video.

GetLinkToSearch(string)

Gets YouTube search URL for the specified search query.

public static string GetLinkToSearch(string searchQuery)

Parameters

searchQuery string

The search query.

Returns

string

The YouTube search URL.

GetLinkToVideo(string)

Gets YouTube video URL for the specified video code.

public static string GetLinkToVideo(string videoCode)

Parameters

videoCode string

The YouTube video code.

Returns

string

The YouTube video URL.

ParseYtCode(string)

Parses YouTube video code from a URI. Returns null if the code cannot be extracted.

public static string ParseYtCode(string uri)

Parameters

uri string

The YouTube URI to parse.

Returns

string

The extracted YouTube video code.

ReplaceOperators(string)

Removes YouTube search operators from the input text.

public static string ReplaceOperators(string text)

Parameters

text string

The input text to process.

Returns

string

The text with operators removed.

SearchYouTubeSerialSerie(int, int, string)

Searches YouTube for all episodes of a TV show season.

public static void SearchYouTubeSerialSerie(int partCount, int seasonNumber, string showName)

Parameters

partCount int

The total number of episodes.

seasonNumber int

The season number.

showName string

The name of the TV show.