Classes/AzureDevOpsFeedPackage.ps1
class AzureDevOpsFeedPackage { [string]$private:Name [string]$private:Id [string]$private:ProjectName [string]$private:FeedId [string]$private:ProtocolType [string]$private:Url [object]$private:Versions hidden [object]$private:Raw AzureDevOpsFeedPackage([Object]$Value) { $project = $script:project $feed = $script:feed $this.Name = $Value.name $this.Id = $Value.id $this.ProjectName = $project $this.FeedId = $feed $this.ProtocolType = $Value.protocolType $this.Url = $Value.url $this.Versions = $Value.versions $this.Raw = $Value } hidden static [AzureDevOpsFeedPackage[]]Get() { $script:project = $script:projectName $script:feed = $script:feedId $artifactFeedPackages = [AzureDevOps]::InvokeRequest() $output = $artifactFeedPackages | ForEach-Object { [AzureDevOpsFeedPackage]::new($_) } return $output } } |