Product News Product Update Ruby

šŸŽ‰Announcing Mindeeā€™s Ruby Client Library2 min read

Jul 26, 2022 < 1 min

šŸŽ‰Announcing Mindeeā€™s Ruby Client Library2 min read

Reading Time: < 1 minutes

In our continued efforts on adding additional language support for Mindee API, we’re happy to announce the release of our Ruby client library. This is now our third client library, after the launch of the Python and Node.js client libraries, both of which were met with great success. They allow you to interact with the Mindee API very easily.

Currently, the Ruby client library supports the following off-the-shelf APIs: invoices API, receipts API, and passports API. It also supports your custom API built with the Mindee API Builder.

āš”ļø Getting started

To get started with the Mindee Ruby client library, you can install it by adding mindee to your Gemfile and then executing bundle install

Or

Running gem install mindee in your terminal.

Once it’s installed, all you have to do to receive your response object is to initialize the Client with your API Key.

require 'mindee'

# Init a new client and configure the Invoice API
mindee_client = Mindee::Client.new.config_invoice(api_key: 'my-api-key')
invoice_data = mindee_client.doc_from_path('/path/to/the/invoice.pdf').parse('invoice')
puts invoice_data.document

šŸ” Extracting Key Fields

With the client library, itā€™s simple to interact with the API and get the extracted fields that you need.

For example, to get the Customer Name from your invoice, youā€™ll need to add the following to your code: 

puts invoice_data.document.customer_name.value

Very easy!!

Conclusion

We’ve included Ruby code examples in our documentation to make it easier for you to get started. 

The library is now available on RubyGems for download. You can also access the release page on GitHub.

Please don’t hesitate to join the community on Slack or contact the support team if you have any questions about the Ruby client library or the API in general.

Your email address will not be published.