goenning / dotnet-outdated

Command line tool to check for outdated DotNet Core dependencies.
MIT License
46 stars 6 forks source link

Replace our custom built Nuget communication with the Nuget client libraries #13

Open flagbug opened 6 years ago

loic-sharma commented 5 years ago

Hey @flagbug, I've been working on a NuGet SDK to make interacting with a NuGet server as simple as possible! Would you mind letting me know what you think of the SDK? See this documentation: https://github.com/loic-sharma/BaGet/tree/master/src/BaGet.Protocol#bagetprotocol

Grabbing a list of package versions is as simple as:

NuGetClient client = new NuGetClient("https://api.nuget.org/v3/index.json");

IReadOnlyList<NuGetVersion>> versions = await client.ListPackageVersionsAsync("Newtonsoft.Json", includeUnlisted: false);

foreach (NuGetVersion version in versions)
{
    Console.WriteLine($"Found version: {version}");
}

Please let me know what you think!