Created
December 3, 2019 22:21
-
-
Save kort3x/35c27389b21388292d14ea1345f802fb to your computer and use it in GitHub Desktop.
choco api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$api = iwr 'https://chocolatey.org/api/v2/Search()?`$filter=IsLatestVersion&`$skip=0&`$top=30&searchTerm=%27zip%27&targetFramework=%27%27&includePrerelease=false' | |
[xml]$xml = $api.content | |
foreach ($entry in $xml.feed.entry) { | |
[PSCustomObject]@{ | |
Name = $entry.title."#text" | |
FriendlyName = $entry.Properties.Title | |
Author = $entry.Author.name | |
Version = $entry.Properties.Version | |
Published = $entry.Properties.Published."#text" | |
Summary = $entry.summary."#text" | |
Description = $entry.Properties.Description | |
Tags = $entry.Properties.Tags."#text" | |
Dependencies = $entry.Properties.Dependencies | |
IsApproved = $entry.Properties.IsApproved | |
DownloadCount = $entry.Properties.DownloadCount."#text" | |
GalleryDetailsUrl = $entry.Properties.GalleryDetailsUrl | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment