primary_connect_client

PrimaryConnectClient - the Ruby gem for the Primary Connect API V1

Client Library to interface with Primary Connect

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build primary_connect_client.gemspec

Then either install the gem locally:

gem install ./primary_connect_client-1.0.0.gem

(for development, run gem install --dev ./primary_connect_client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'primary_connect_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/PrimaryDotHealth/connect-ruby-client, then add the following in the Gemfile:

gem 'primary_connect_client', :git => 'https://github.com/PrimaryDotHealth/connect-ruby-client.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'primary_connect_client'

# Setup authorization
PrimaryConnectClient.configure do |config|
  # Configure Bearer authorization: bearer_auth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = PrimaryConnectClient::DefaultApi.new
opts = {
  order: Primary::Connect::Order.new.to_json # Order |
}

begin
  #create order
  api_instance.create_order(opts)
rescue PrimaryConnectClient::ApiError => e
  puts "Exception when calling DefaultApi->create_order: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://connect.primary.health

Class Method HTTP request Description
PrimaryConnectClient::DefaultApi create_order POST /api/v1/orders create order
PrimaryConnectClient::DefaultApi get_order GET /api/v1/orders/id show order
PrimaryConnectClient::DefaultApi get_result GET /api/v1/orders/order_id/results/id show result
PrimaryConnectClient::DefaultApi list_events GET /api/v1/events list events
PrimaryConnectClient::DefaultApi list_orders GET /api/v1/orders list orders
PrimaryConnectClient::DefaultApi list_results GET /api/v1/orders/order_id/results list results

Documentation for Models

TODO

Documentation for Authorization

bearer_auth

  • Type: Bearer authentication