Rubix API wrapper in Javascript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Ruby wrapper for Rubix api.


Add this line to your application's Gemfile:

gem 'rubix-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubix-api


First you need to require the gem and you initialize the client by instantiating the Rubix class. To do this you need your access token and you can optionally specify api version and domain.

require 'rubix-api'

client =, version, domain) # Version and domain are optional

To list categories. client.list_categories

To list patterns you need to pass page_number as the only parameter.

client.list_patterns(2) #where "2" means the page number

To delete patterns you need to pass the pattern_id as the only parameter.

client.delete_pattern(100) #where "100" means the pattern_id

To add a matching pattern you need to pass the file itself or an file url for it, a label, and the category name to which the pattern belongs.

client.add_pattern({file: FIle, remote_file_url: "", label: 'uid', category_name: 'matching'})

To use feature matching, a file or file url is needed, as well as a minimum ratio and a minimum matches amount.

client.feature_matching({file, remote_file_url, mr: 0.9, mma: 150}) 

For OCR, Rubix needs the path to image or the file itself, and optionally, the area to be scanned.

client.ocr({file, remote_file_url, rectangles: [[x1,y1.x2,y2],..,[x1,y1,x2,y2]]}


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request