Activity Feeds V3 is in closed alpha — do not use it in production (just yet).

Installation

NuGet Package Manager

NuGet\Install-Package getstream-net -Version 1.5.0

.NET CLI

dotnet add package getstream-net --version 1.5.0

PackageReference

Add the following to your .csproj file:

<PackageReference Include="getstream-net" Version="1.5.0" />

GitHub repository: https://github.com/GetStream/getstream-net. Feel free to submit bug reports and feature requests.

The package is tested against these environments:

  • .NET Framework 4.6.2+
  • .NET Core 3.1+
  • .NET 5.0+
  • .NET 6.0+
  • .NET 7.0+
  • .NET 8.0+

To create a client, you’ll need your API key and secret. Both of them can be found in your Stream Dashboard.

You can optionally pass a timeout for the API requests, the default timeout is 6000ms.

using GetStream;
using GetStream.Models;

class Program
{
    static async Task Main(string[] args)
    {
        string apiKey = "";
        string secret = "";

        // Create client using ClientBuilder
        var builder = new ClientBuilder()
            .ApiKey(apiKey)
            .ApiSecret(secret);

        // Build the main client
        var client = builder.Build();

        // Build the feeds client
        var feedsClient = builder.BuildFeedsClient();

        // Your feeds operations here...
    }
}

Alternative initialization

You can also initialize the client using configuration:

using GetStream;
using Microsoft.Extensions.Configuration;

// Using configuration
var configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .Build();

var builder = new ClientBuilder()
    .ApiKey(configuration["Stream:ApiKey"])
    .ApiSecret(configuration["Stream:Secret"]);

var client = builder.Build();
var feedsClient = builder.BuildFeedsClient();
© Getstream.io, Inc. All Rights Reserved.