Official Ruby SDK for the ThreadSync API — enterprise data integration platform.
Preview: SDKs are in preview and installed from GitHub. RubyGems packages will be available at GA.
Add to your Gemfile:
gem'threadsync',git: 'https://github.com/threadsync-infrastructure/threadsync-ruby.git'Then run:
bundle installrequire'threadsync'client=ThreadSync::Client.new(bearer_token: 'your-bearer-token')# Create a connectionconnection=client.connections.create(provider: 'salesforce')puts"Connection ID: #{connection.id}, Status: #{connection.status}"# Retrieve a connectionfetched=client.connections.get(connection.id)# Create a syncsync=client.sync.create(source: {connection: 'conn_salesforce_123',object: 'Contact',table: 'contacts'},destination: {connection: 'conn_postgres_456',object: 'record',table: 'salesforce_contacts'},schedule: '0 * * * *')puts"Sync ID: #{sync.id}, Status: #{sync.status}"# Check sync statusresult=client.sync.get(sync.id)puts"Records synced: #{result.records_synced}"| Parameter | Type | Description |
|---|---|---|
bearer_token: | String | Your ThreadSync API key |
base_url: | String | Override the API base URL (optional) |
| Method | Description |
|---|---|
create(provider:) | Create a new connection |
get(id) | Retrieve a connection by ID |
| Method | Description |
|---|---|
create(source:, destination:, schedule:) | Create a new sync job |
get(id) | Retrieve a sync job by ID |
Connection—id,provider,name,statusSyncResult—id,status,records_synced
- Ruby 3.0 or later
MIT — see LICENSE for details.