Skip to content

threadsync-infrastructure/threadsync-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ThreadSync C# SDK

NuGet License .NET

Official C# SDK for the ThreadSync API — enterprise data integration platform.

Installation

Preview: SDKs are in preview and installed from GitHub. NuGet packages will be available at GA.

git clone https://github.com/threadsync-infrastructure/threadsync-csharp.git

Then add a project reference to your .csproj:

<ProjectReference Include="../threadsync-csharp/src/ThreadSync.Sdk/ThreadSync.Sdk.csproj" />

Quick Start

using ThreadSync.Sdk;

var client = new ThreadSyncClient("your-bearer-token");

// Create a connection
var connection = await client.Connections.CreateAsync("salesforce");
Console.WriteLine($"Connection ID: {connection.Id}, Status: {connection.Status}");

// Retrieve a connection
var fetched = await client.Connections.GetAsync(connection.Id);

// Create a sync
var config = new SyncConfig(
    Source: new Endpoint(
        Connection: "conn_salesforce_123",
        Object: "Contact",
        Table: "contacts"
    ),
    Destination: new Endpoint(
        Connection: "conn_postgres_456",
        Object: "record",
        Table: "salesforce_contacts"
    ),
    Schedule: "0 * * * *"
);

var sync = await client.Sync.CreateAsync(config);
Console.WriteLine($"Sync ID: {sync.Id}, Status: {sync.Status}");

// Check sync status
var status = await client.Sync.GetAsync(sync.Id);
Console.WriteLine($"Records synced: {status.RecordsSynced}");

API Reference

ThreadSyncClient

Parameter Type Description
bearerToken string Your ThreadSync API key
baseUrl string? Override the API base URL (optional)

client.Connections

Method Description
CreateAsync(provider) Create a new connection
GetAsync(id) Retrieve a connection by ID

client.Sync

Method Description
CreateAsync(config) Create a new sync job
GetAsync(id) Retrieve a sync job by ID

Models

  • ConnectionId, Provider, Name, Status
  • SyncConfigSource (Endpoint), Destination (Endpoint), Schedule
  • EndpointConnection, Object, Table
  • SyncId, Status, RecordsSynced

Requirements

  • .NET 8.0 or later

License

MIT — see LICENSE for details.

About

Official C# / .NET SDK for ThreadSync's LLM Gateway. Multi-provider governed AI access with policy controls, audit trails, and cost tracking.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages