Add the Ruby client to your Gemfile:
gem 'cloudmersive-validate-api-client', '~> 1.3.2'
Get your API Key (available in your Account Dashboard) and instantiate the API Client object:
# Load the gem
require 'cloudmersive-validate-api-client'
# Setup authorization
CloudmersiveValidateApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveValidateApiClient::DomainApi.new
domain = "domain_example" # String | Domain name to check, for example \"cloudmersive.com\". The input is a string so be sure to enclose it in double-quotes.
begin
#Validate a domain name
result = api_instance.domain_check(domain)
p result
rescue CloudmersiveValidateApiClient::ApiError => e
puts "Exception when calling DomainApi->domain_check: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-security-api-client', '~> 1.0.1'
Get your API Key (available in your Account Dashboard) and instantiate the API Client object:
# load the gem
require 'cloudmersive-security-api-client'
# setup authorization
CloudmersiveSecurityApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveSecurityApiClient::ContentThreatDetectionApi.new
value = 'value_example' # String | User-facing text input.
begin
#Automatically detect threats in an input string
result = api_instance.content_threat_detection_automatic_threat_detection_string(value)
p result
rescue CloudmersiveSecurityApiClient::ApiError => e
puts "Exception when calling ContentThreatDetectionApi->content_threat_detection_automatic_threat_detection_string: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-image-recognition-api-client', '~> 1.3.2'
Get your API Key (available in your Account Dashboard) and instantiate the API Client object:
# Load the gem
require 'cloudmersive-image-recognition-api-client'
# Setup authorization
CloudmersiveImageRecognitionApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveImageRecognitionApiClient::ArtisticApi.new
style = "style_example" # String | The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
image_file = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
begin
#Transform an image into an artistic painting automatically
result = api_instance.artistic_painting(style, image_file)
p result
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
puts "Exception when calling ArtisticApi->artistic_painting: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-convert-api-client', '~> 1.3.3'
Import the API Client package by adding this line to the top of your .rb file:
# Load the gem
require 'cloudmersive-convert-api-client'
# Setup authorization
CloudmersiveConvertApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveConvertApiClient::CompareDocumentApi.new
input_file1 = File.new("/path/to/file.txt") # File | First input file to perform the operation on.
input_file2 = File.new("/path/to/file.txt") # File | Second input file to perform the operation on (more than 2 can be supplied).
begin
#Compare Two Word DOCX
result = api_instance.compare_document_docx(input_file1, input_file2)
p result
rescue CloudmersiveConvertApiClient::ApiError => e
puts "Exception when calling CompareDocumentApi->compare_document_docx: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-dataintegration-api-client', '~> 2.0', '>= 2.0.2'
Import the API Client package by adding this line to the top of your .rb file:
# load the gem
require 'cloudmersive-dataintegration-api-client'
# setup authorization
CloudmersiveDataintegrationApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveDataintegrationApiClient::BackupConvertApi.new
opts = {
input_file: File.new('/path/to/inputfile') # File | Input file to perform the operation on
}
begin
#Lists all tables stored in a SQL Server Backup (.BAK) file
result = api_instance.dataintegration_backup_convert_mssql_bak_get_tables_post(opts)
p result
rescue CloudmersiveDataintegrationApiClient::ApiError => e
puts "Exception when calling BackupConvertApi->dataintegration_backup_convert_mssql_bak_get_tables_post: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-currency-api-client', '~> 2.0', '>= 2.0.2'
Import the API Client package by adding this line to the top of your .rb file:
# load the gem
require 'cloudmersive-currency-api-client'
# setup authorization
CloudmersiveCurrencyApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveCurrencyApiClient::CurrencyExchangeApi.new
source = 'source_example' # String | Source currency three-digit code (ISO 4217), e.g. USD, EUR, etc.
destination = 'destination_example' # String | Destination currency three-digit code (ISO 4217), e.g. USD, EUR, etc.
source_price = 1.2 # Float | Input price, such as 19.99 in source currency
begin
#Converts a price from the source currency into the destination currency
result = api_instance.currency_exchange_convert_currency(source, destination, source_price)
p result
rescue CloudmersiveCurrencyApiClient::ApiError => e
puts "Exception when calling CurrencyExchangeApi->currency_exchange_convert_currency: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-nlp-api-client', '~> 1.2.9'
Import the API Client package by adding this line to the top of your .rb file:
# Load the gem
require 'cloudmersive-nlp-api-client'
# Setup authorization
CloudmersiveNlpApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveNlpApiClient::ExtractEntitiesStringApi.new
value = "value_example" # String | Input string
begin
#Extract entities from string
result = api_instance.extract_entities_string_post(value)
p result
rescue CloudmersiveNlpApiClient::ApiError => e
puts "Exception when calling ExtractEntitiesStringApi->extract_entities_string_post: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-ocr-api-client', '~> 1.3.4'
Get your API Key (available in your Account Dashboard) and instantiate the API Client object:
# Load the gem
require 'cloudmersive-ocr-api-client'
# Setup authorization
CloudmersiveOcrApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
opts = {
language: "language_example" # String | Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish)
}
begin
#Convert a photo of a document into text
result = api_instance.image_ocr_photo_to_text(image_file, opts)
p result
rescue CloudmersiveOcrApiClient::ApiError => e
puts "Exception when calling ImageOcrApi->image_ocr_photo_to_text: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-barcode-api-client', '~> 1.2.9'
Get your API Key (available in your Account Dashboard) and instantiate the API Client object:
# Load the gem
require 'cloudmersive-barcode-api-client'
# Setup authorization
CloudmersiveBarcodeApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveBarcodeApiClient::BarcodeLookupApi.new
value = "value_example" # String | Barcode value
begin
#Lookup a barcode value and return product data
result = api_instance.barcode_lookup_ean_lookup(value)
p result
rescue CloudmersiveBarcodeApiClient::ApiError => e
puts "Exception when calling BarcodeLookupApi->barcode_lookup_ean_lookup: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-video-api-client', '~> 2.0', '>= 2.0.1'
Import the API Client package by adding this line to the top of your .rb file:
# load the gem
require 'cloudmersive-video-api-client'
# setup authorization
CloudmersiveVideoApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveVideoApiClient::VideoApi.new
input_file = File.new('/path/to/inputfile') # File | Input file to perform the operation on.
opts = {
file_url: 'file_url_example', # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
max_width: 56, # Integer | Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
max_height: 56, # Integer | Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
preserve_aspect_ratio: true, # BOOLEAN | Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
frame_rate: 56, # Integer | Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
quality: 56, # Integer | Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
extend_processing_time: true # BOOLEAN | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
}
begin
#Convert Video to MP4 format.
result = api_instance.video_convert_to_mp4(input_file, opts)
p result
rescue CloudmersiveVideoApiClient::ApiError => e
puts "Exception when calling VideoApi->video_convert_to_mp4: #{e}"
end
Add the Ruby client to your Gemfile:
gem 'cloudmersive-virus-scan-api-client', '~> 1.3.0'
Import the API Client package by adding this line to the top of your .rb file:
# Load the gem
require 'cloudmersive-virus-scan-api-client'
# Setup authorization
CloudmersiveVirusScanApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
begin
#Scan a file for viruses
result = api_instance.scan_file(input_file)
p result
rescue CloudmersiveVirusScanApiClient::ApiError => e
puts "Exception when calling ScanApi->scan_file: #{e}"
end