C# SDK
The Feedz.Client NuGet package provides a strongly-typed .NET client for the Feedz API. It handles authentication, delta compression, and the full upload/download lifecycle.
Installation
dotnet add package Feedz.Client
Source and issue tracker: github.com/feedz-io/Client.
Creating a client
Authenticate with a personal access token:
var client = FeedzClient.Create("T-xyzXYZ");
var repo = client.ScopeToRepository("my-org", "my-repo");
For public repositories, an anonymous client can be used for downloads:
var client = FeedzClient.CreateAnonymous();
var repo = client.ScopeToRepository("my-org", "my-repo");
Listing packages
var packages = await repo.Packages.List();
Uploading a package
Upload uses delta compression automatically. Upload from a file path:
await repo.Packages.Upload(@"C:\MyPackage.1.0.0.tgz", replace: false);
Upload from a stream:
using var stream = File.OpenRead(@"C:\MyPackage.1.0.0.tgz");
await repo.Packages.Upload(stream, "MyPackage.1.0.0.tgz", replace: false);
Set replace: true to overwrite an existing version with the same ID and version number.
Downloading a package
Download a specific version:
await repo.Packages.Download("MyPackage", "1.0.0");
To use delta compression on download, pass a similarPackagePath — a local file or directory that the client will compare against to compute the delta:
await repo.Packages.Download(
"MyPackage",
"1.1.0",
similarPackagePath: @"C:\packages\MyPackage.1.0.0.tgz");
If similarPackagePath is a directory, the client scans it for a file to use as the basis. If no suitable file is found, or if the delta is larger than the full package, the full package is transferred instead.