Magons / test_ruby_sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openapi_client

OpenapiClient - the Ruby gem for the Verbit Transcribe (v0.8 tech preview)

Verbit API (application programming interface) version 1 provides programmatic access to Verbit's premium end-to-end transcription and captioning solution. It is based on state of the art ASR (automatic speech recognition) engine and thorough human review. The API can easily be integrated into customers' systems, enriching the user experience with transcriptions and closed captions for video and audio.

All actual schemas you can download by this link https://platform.verbit.co/api/v1/schemas/schema_name.json

Testing API integration can be done via sandbox token (also found on customer page) and using sandbox API url (https://sandbox-api.verbit.co). When using the sandbox, no real ASR or human editing is performed, and there are several additional params available to imitate different states of API. Please see "Create new job" section below.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v0.8 tech preview
  • 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 openapi_client.gemspec

Then either install the gem locally:

gem install ./openapi_client-1.0.0.gem

(for development, run gem install --dev ./openapi_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 'openapi_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.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 'openapi_client'

api_instance = OpenapiClient::AuthenticationApi.new
inline_object = OpenapiClient::InlineObject.new({payload: OpenapiClient::AuthPayload.new({api_key: 'api_key_example'})}) # InlineObject | 
opts = {
  x_tracing_id: 'b392efa9-1f26-4e79-9cd5-41ab283e9c76', # String | Tracing ID, should be unique in every request, sent back to the client
  x_request_timestamp: Time.parse('2021-07-30T21:00:00.0Z') # Time | The timestamp of the request (ISO8901, UTC TZ). When not sent, will be automatically set to server request time.
}

begin
  #requests JWT for authentication
  result = api_instance.auth(inline_object, opts)
  p result
rescue OpenapiClient::ApiError => e
  puts "Exception when calling AuthenticationApi->auth: #{e}"
end

Documentation for API Endpoints

All URIs are relative to /api/v1

Class Method HTTP request Description
OpenapiClient::AuthenticationApi auth POST /auth requests JWT for authentication
OpenapiClient::OrderApi orders_id_cancel_post POST /orders/{id}/cancel Cancels an order
OpenapiClient::OrderApi orders_id_get GET /orders/{id} Gets an order information
OpenapiClient::OrderApi orders_post POST /orders Creates an order

Documentation for Models

Documentation for Authorization

BearerAuth

  • Type: Bearer authentication (JWT)

About


Languages

Language:Ruby 99.6%Language:Shell 0.4%