Using .NET Core/Standard (C#) I'd like to retrieve details of all the nuget packages for a particular owner.
For example supplying "charliepoole" would give me all the related packages like on the page: https://www.nuget.org/profiles/charliepoole
I'm currently using package NuGet.ProjectModel to retrieve individual packages by ID/Version but there does not seem to be any other related methods that can help me.
For reference this is how I'm retrieving an individual package by ID and version:
public async Task<IPackageSearchMetadata> GetPackageAsync(string id, string version, CancellationToken cancellationToken = default)
{
var packageSource = new PackageSource("https://api.nuget.org/v3/index.json", "NugetV3");
var providers = new List<Lazy<INuGetResourceProvider>>();
providers.AddRange(Repository.Provider.GetCoreV3());
var repo = new SourceRepository(packageSource, providers);
var packageMetadataResource = await repo.GetResourceAsync<PackageMetadataResource>(cancellationToken);
var packageIdentity = new PackageIdentity(id, NuGetVersion.Parse(version));
var context = new SourceCacheContext
{
NoCache = true,
DirectDownload = true
};
return await packageMetadataResource
.GetMetadataAsync(packageIdentity, context, new NullLogger(), cancellationToken);
}
Is this possible using any of the official supplied nuget packages that talk to the nuget API?