Here is the GitHub repository.
Quickstart
Prerequisites
Before you begin, make sure you have:
- A Fortress account
- Connection to your cloud account
- Your API token
- Your Organization ID
You can find your API token and Organization ID in the Fortress dashboard under the API Keys section.
Installation
Install the SDK using pip:
gem install fortress_sdk_ruby
Get Started
require 'fortress_sdk_ruby'
client = Fortress::Client.new(api_key, organization_id)
client.create_tenant("tenant_name", "alias")
conn = client.connect_tenant("tenant_name")
conn.exec('CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(50))')
conn.exec("INSERT INTO users (name) VALUES ('Alice')")
conn.exec('SELECT * FROM users') do |result|
result.each do |row|
print "User: #{row['name']}\n"
end
end
client.delete_tenant("tenant_name")