cloudmersive-barcode-api-client

CloudmersiveBarcodeApiClient - the Ruby gem for the barcodeapi

Barcode APIs let you generate barcode images, and recognize values from images of barcodes.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: 2.0.2
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build cloudmersive-barcode-api-client.gemspec

Then either install the gem locally:

gem install ./cloudmersive-barcode-api-client-2.0.2.gem

(for development, run gem install --dev ./cloudmersive-barcode-api-client-2.0.2.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 'cloudmersive-barcode-api-client', '~> 2.0.2'

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 'cloudmersive-barcode-api-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 '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 EAN barcode value, 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

Documentation for API Endpoints

All URIs are relative to https://api.cloudmersive.com

Class Method HTTP request Description
CloudmersiveBarcodeApiClient::BarcodeLookupApi barcode_lookup_ean_lookup POST /barcode/lookup/ean Lookup EAN barcode value, return product data
CloudmersiveBarcodeApiClient::BarcodeScanApi barcode_scan_image POST /barcode/scan/image Scan and recognize an image of a barcode
CloudmersiveBarcodeApiClient::GenerateBarcodeApi generate_barcode_ean13 POST /barcode/generate/ean-13 Generate a EAN-13 code barcode as PNG file
CloudmersiveBarcodeApiClient::GenerateBarcodeApi generate_barcode_ean8 POST /barcode/generate/ean-8 Generate a EAN-8 code barcode as PNG file
CloudmersiveBarcodeApiClient::GenerateBarcodeApi generate_barcode_qr_code POST /barcode/generate/qrcode Generate a QR code barcode as PNG file
CloudmersiveBarcodeApiClient::GenerateBarcodeApi generate_barcode_upca POST /barcode/generate/upc-a Generate a UPC-A code barcode as PNG file
CloudmersiveBarcodeApiClient::GenerateBarcodeApi generate_barcode_upce POST /barcode/generate/upc-e Generate a UPC-E code barcode as PNG file

Documentation for Models

Documentation for Authorization

Apikey

  • Type: API key
  • API key parameter name: Apikey
  • Location: HTTP header