YoutubeClientSearchVideos Method
Searchs videos through Youtube that matches the specified criteria.
Namespace: DevCase.ThirdParty.Google.YoutubeAssembly: DevCase.net48.ThirdParty.GoogleServices (in DevCase.net48.ThirdParty.GoogleServices.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public Task<List<SearchResult>> SearchVideos(
string searchPattern,
VideoDefinitionEnum videoDefinition,
OrderEnum resultSorting
)
Public Function SearchVideos (
searchPattern As String,
videoDefinition As VideoDefinitionEnum,
resultSorting As OrderEnum
) As Task(Of List(Of SearchResult))
Dim instance As YoutubeClient
Dim searchPattern As String
Dim videoDefinition As VideoDefinitionEnum
Dim resultSorting As OrderEnum
Dim returnValue As Task(Of List(Of SearchResult))
returnValue = instance.SearchVideos(searchPattern,
videoDefinition, resultSorting)
public:
Task<List<SearchResult^>^>^ SearchVideos(
String^ searchPattern,
VideoDefinitionEnum videoDefinition,
OrderEnum resultSorting
)
member SearchVideos :
searchPattern : string *
videoDefinition : VideoDefinitionEnum *
resultSorting : OrderEnum -> Task<List<SearchResult>>
No code example is currently available or this language may not be supported.
- searchPattern String
-
The search pattern.
Only videos matching the specified title pattern will be listed.
- videoDefinition VideoDefinitionEnum
-
A value that lets you restrict the search for HD or SD videos.
- resultSorting OrderEnum
-
A value that determines the sorting method of the resulting videos (Sort by date, sort by relevance, etc...)
TaskListSearchResult
The resulting
TaskTResult.
This is a code example.
No code example is currently available or this language may not be supported.
Dim client As New YoutubeClient("C:\GoogleSecrets.json", "yourmail@gmail.com")
Dim credential As UserCredential = Await client.AuthorizeAsync()
Dim videos As List(Of SearchResult) = Await client.SearchVideos("Rihanna", VideoDefinitionEnum.High, OrderEnum.Relevance)
Dim videoCount As Integer
For Each video As SearchResult In videos
Console.WriteLine(String.Format("Count: {0}; Id: {1}; Title: {2}, Url: {3}",
Interlocked.Increment(videoCount),
video.Id.VideoId, video.Snippet.Title,
String.Format("http://www.youtube.com/watch?v={0}", video.Id.VideoId)))
Next video
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.