Getting Started

NuGet is the simplest way to get the Storj client library. You can find it on NuGet named Uplink.NET. You can use the client library to build several types of .NET applications including Xamarin mobile applications.

Connecting to a Storj Satellite and listing buckets and downloading a file from a bucket can be done as follows.

using uplink.NET.Models;
using uplink.NET.Services;
// ...
uplink.NET.Models.Scope.SetTempDirectory(System.IO.Path.GetTempPath());
var scope = new uplink.NET.Models.Scope("<YOUR_SCOPE>",
"<SATELLITE_ADDRESS_AND_PORT>",
"<YOUR_PASSWORD>");
// Listing buckets.
var bucketService = new BucketService(scope);
var listOptions = new BucketListOptions();
var buckets = await bucketService.ListBucketsAsync(listOptions);
foreach (BucketInfo bucket in buckets.Items) {
Console.WriteLine(bucket.Name);
}
// Download a file from a bucket.
var objectService = new ObjectService(scope);
var download = objectService.DownloadObjectAsync(bucket, "test.jpg", false);
await download.StartDownloadAsync();