New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

idp_ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idp_ruby

  • 0.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

6Estates idp-ruby

A Ruby SDK for communicating with the 6Estates Intelligent Document Processing(IDP) Platform.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add idp_sdk_ruby

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install idp_sdk_ruby

Documentation

The documentation for the 6Estates IDP API can be found via https://idp-sea.6estates.com/docs

Usage

1. Initialize the 6Estates IDP Client

6E API Access Token(Deprecated)

    require 'idp_sdk_ruby'
    
    c=IdpSdkRuby::Client.new(region:"your-region", token:'your-token-here')

6E API Authorization based on oauth 2.0

    require 'idp_sdk_ruby'
    
    oauth=IdpSdkRuby::oauthutil(region:"your-region", authorization: "your-authorization-here")
    c=IdpSdkRuby::Client.new(region:"your-region", token:oauth, isOauth:true)

2. To Extract Fields in Synchronous Way

If you just need to do one file at a time

    require 'idp_sdk_ruby'
    c=IdpSdkRuby::Client.new(region:"test", token:'your-token-here')
    task_result=c.extraction_task.run_simple_task(file:File.new('path-to-the-file',"rb"), file_type:IdpSdkRuby::FileType.new().full_name_of_the_file_type)

3. To Extract Fields in Asynchronous Way

If you need to do a batch of files

    require 'idp_sdk_ruby'
    c=IdpSdkRuby::Client.new(region:"test", token:'your-token-here')
    task=c.extraction_task.create(file:File.new('path-to-the-file',"rb"), file_type:IdpSdkRuby::FileType.new().full_name_of_the_file_type)
    task_result = result(task.task_id)
    while(task_result.status=='Doing' or task_result.status=='Init')
        sleep(3)
        task_result = result(task.task_id)
    end

FAQs

Package last updated on 13 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc