Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
uses: ./.github/workflows/_test-units.yml
needs: [ betterleaks, static-analysis ]
secrets: inherit
test-unit-lite:
uses: ./.github/workflows/_test-units.yml
test-units-lite:
uses: ./.github/workflows/_test-units-lite.yml
needs: [ betterleaks, static-analysis ]
secrets: inherit
test-integration:
Expand All @@ -31,7 +31,7 @@ jobs:
secrets: inherit
test-integration-lite:
uses: ./.github/workflows/_test-integration-lite.yml
needs: test-unit-lite
needs: test-units-lite
secrets: inherit
test-smoke:
uses: ./.github/workflows/_test-smoke.yml
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/bank_account_details_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/bank_statement_fr_v2_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/cropper_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Initialize a custom endpoint for this product
custom_endpoint = mindee_client.create_endpoint(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/default_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Initialize a custom endpoint for this product
custom_endpoint = mindee_client.create_endpoint(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/expense_receipts_v5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/expense_receipts_v5_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/financial_document_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/financial_document_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/idcard_fr_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/international_id_v2_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/invoice_splitter_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/invoices_v4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/invoices_v4_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/multi_receipts_detector_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/passport_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/resume_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'mindee'
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
input_source = Mindee::PathInputSource.new('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/v2_classification.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classification_params = {
}

# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
input_source = Mindee::PathInputSource.new(input_path)

# Send for processing
response = mindee_client.enqueue_and_get_result(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/v2_crop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ crop_params = {
}

# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
input_source = Mindee::PathInputSource.new(input_path)

# Send for processing
response = mindee_client.enqueue_and_get_result(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/v2_extraction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extraction_params = {
}

# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
input_source = Mindee::PathInputSource.new(input_path)

# Send for processing
response = mindee_client.enqueue_and_get_result(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/v2_extraction_webhook.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extraction_params = {
}

# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
input_source = Mindee::PathInputSource.new(input_path)

# Send for processing
response = mindee_client.enqueue(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/v2_ocr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ocr_params = {
}

# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
input_source = Mindee::PathInputSource.new(input_path)

# Send for processing
response = mindee_client.enqueue_and_get_result(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/v2_split.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ split_params = {
}

# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
input_source = Mindee::PathInputSource.new(input_path)

# Send for processing
response = mindee_client.enqueue_and_get_result(
Expand Down
2 changes: 1 addition & 1 deletion docs/code_samples/workflow_polling.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workflow_id = 'workflow-id'
mindee_client = Mindee::V1::Client.new

# Load a file from disk
input_source = mindee_client.source_from_path('path/to/my/file.ext')
input_source = Mindee::PathInputSource.new('path/to/my/file.ext')

# Initialize a custom endpoint for this product
custom_endpoint = mindee_client.create_endpoint(
Expand Down
7 changes: 7 additions & 0 deletions lib/mindee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ module Product
module Search
end
end

# Aliases for deeply nested classes
Base64InputSource = Mindee::Input::Source::Base64InputSource
BytesInputSource = Mindee::Input::Source::BytesInputSource
FileInputSource = Mindee::Input::Source::FileInputSource
PathInputSource = Mindee::Input::Source::PathInputSource
URLInputSource = Mindee::Input::Source::URLInputSource
end

# Shorthand to call the logger from anywhere.
Expand Down
69 changes: 51 additions & 18 deletions sig/mindee.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ class Object
end

module Mindee
module Error
end
Base64InputSource: singleton(Input::Source::Base64InputSource)
BytesInputSource: singleton(Input::Source::BytesInputSource)
FileInputSource: singleton(Input::Source::FileInputSource)
PathInputSource: singleton(Input::Source::PathInputSource)
URLInputSource: singleton(Input::Source::URLInputSource)

module Extraction
module Dependencies
end

module HTTP
module Error
end

module PDF
module Geometry
end

module Input
module Source
end
module HTTP
end

module Image
Expand All @@ -33,30 +34,62 @@ module Mindee
module Logging
end

module Parsing
module Common
module Input
module Source
end
end

module Standard
end
module Logging
end

module Universal
end
module PDF
end

module V1
module Product
module EU
module Extraction
end

module HTTP
end

module Parsing
module Common
end

module Standard
end

module Universal
end
end

module Product
module FR
end
end
end

module V2
module FileOperation
module Crop
end

module IND
module Split
end
end

module HTTP
end

module US
module Parsing
module Search
end
end

module Product
end

module Search
end
end
end
Loading
Loading