Ruby

Bridge provides a Ruby client for interacting with the Bridge API. The generated SDK provides idiomatic resource methods, automatic authentication, and consistent error handling.

Features

  • Idiomatic Ruby: Snake-case methods and keyword arguments
  • Authentication: Automatic API key handling
  • Error Handling: Typed errors with API response details
  • Generated Resources: Methods and models generated from the Bridge API specification
  • Environment Support: Built-in Production and Sandbox configuration

Installation

Add the SDK to your Gemfile:

gem "usebridge-api"

Then install it:

bundle install

Quick Start

require "bridge_api"
client = BridgeApi::Client.new(
api_key: ENV.fetch("BRIDGE_API_KEY"),
environment: BridgeApi::Environment::PRODUCTION
)
patient = client.patients.v_2.create_patient(
first_name: "Jane",
last_name: "Smith",
email: "patient@example.com",
date_of_birth: "2000-01-01"
)

Use BridgeApi::Environment::SANDBOX when testing against the Sandbox environment.

Resources