A lightweight Dart client for querying and interacting with the NuGet Server API.
✨ Features
- 🔍 Autocomplete package IDs
- 📦 Download package content (
.nupkg) and manifest (.nuspec) - 📋 Fetch package metadata — all versions or a specific version
- 🏷️ Get the latest package version or list all versions
- ✅ Check if a package exists
- 🔗 Get the report abuse URL for a package
- 🔎 Search packages
🚀 Getting Started
Add the package to your pubspec.yaml:
dependencies:
nuget: ^0.2.0
Then import it:
import 'package:nuget/nuget.dart';
⚡ Quick Example
Download the .nupkg content for a specific package version:
import 'package:nuget/nuget.dart';
void main() async {
final client = NuGetClient();
const packageId = 'Newtonsoft.Json';
const version = '13.0.3';
final content = await client.downloadPackageContent(
packageId,
version: version,
);
print('`$packageId` ($version) package size: ${content.length} bytes');
client.close();
}
🐞 Features and Bugs
If you encounter bugs or need additional functionality, please file an issue.
Libraries
- nuget
- This library provides easy access to the NuGet Server API, allowing you to perform various operations such as querying package information, downloading package content, fetching package metadata, and more.