Skip to content

Commit

Permalink
Update Find-YouTubeVideo.ps1
Browse files Browse the repository at this point in the history
Validate next page token not empty
  • Loading branch information
pcgeek86 authored Aug 1, 2023
1 parent 349e4f4 commit 51425de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/Find-YouTubeVideo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ function Find-YouTubeVideo {
param (
[Parameter(Mandatory = $true)]
[string] $Query,
[ValidateNotNullOrEmpty()]
[string] $PageToken,
[switch] $Raw
)
Expand All @@ -17,4 +18,4 @@ function Find-YouTubeVideo {

$Result.Items | ForEach-Object -Process { $PSItem.PSTypeNames.Add('YouTube.VideoResult') }
$Result.Items
}
}

0 comments on commit 51425de

Please sign in to comment.