aspose_omr_cloud 18.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +98 -0
- data/docs/AsposeResponse.md +9 -0
- data/docs/FileInfo.md +11 -0
- data/docs/OMRFunctionParam.md +10 -0
- data/docs/OMRResponse.md +13 -0
- data/docs/OMRResponseDetails.md +11 -0
- data/docs/OmrApi.md +41 -0
- data/docs/OmrResponseContent.md +12 -0
- data/docs/OmrResponseInfo.md +12 -0
- data/docs/Payload.md +9 -0
- data/docs/RecognitionStatistics.md +12 -0
- data/docs/ServerStat.md +10 -0
- data/lib/aspose_omr_cloud.rb +65 -0
- data/lib/aspose_omr_cloud/api/omr_api.rb +127 -0
- data/lib/aspose_omr_cloud/api_client.rb +441 -0
- data/lib/aspose_omr_cloud/api_error.rb +53 -0
- data/lib/aspose_omr_cloud/configuration.rb +218 -0
- data/lib/aspose_omr_cloud/models/aspose_response.rb +204 -0
- data/lib/aspose_omr_cloud/models/file_info.rb +245 -0
- data/lib/aspose_omr_cloud/models/omr_function_param.rb +214 -0
- data/lib/aspose_omr_cloud/models/omr_response.rb +244 -0
- data/lib/aspose_omr_cloud/models/omr_response_content.rb +240 -0
- data/lib/aspose_omr_cloud/models/omr_response_details.rb +228 -0
- data/lib/aspose_omr_cloud/models/omr_response_info.rb +244 -0
- data/lib/aspose_omr_cloud/models/payload.rb +204 -0
- data/lib/aspose_omr_cloud/models/recognition_statistics.rb +241 -0
- data/lib/aspose_omr_cloud/models/server_stat.rb +224 -0
- data/lib/aspose_omr_cloud/version.rb +30 -0
- metadata +262 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d085e110d20f09d2c9e4602b70423bdf04950a88
|
|
4
|
+
data.tar.gz: 56f94b1baa1b802996df116b1133336b7fdf4483
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 34f573df9213e426dcd089d7f296fcef565aed9aa1e6c779a7a929ae925f85c387e3192b2fa4663715087f18cf5b4bde854b87960999f153b30bc5684f9e59f3
|
|
7
|
+
data.tar.gz: d5f31e95075b6f8a83c12d62706b975e43817993053da26f0afad2254984d7b841964402659ffdea8782c8f1ddf1915db01b4854a70b8f1851d39ed3543aab30
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2001-2018 Aspose Pty Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Aspose.OMR for Cloud
|
|
2
|
+
|
|
3
|
+
[Aspose.OMR for Cloud](https://products.aspose.cloud/omr/cloud) is a REST API that helps you to perform optical mark recognition in the cloud. We provide a series of [SDKs](https://github.com/aspose-omr-cloud). Along with that, you can get [binaries](https://github.com/aspose-omr-cloud/aspose-omr-cloud-dotnet/releases) to start working immediately and recognize various OMR forms. Developers can embed [optical recognition](https://en.wikipedia.org/wiki/Optical_mark_recognition) in any type of application to extract data from images of tests, exams, questionnaires, surveys, etc. In the repository you can find examples on how to start using Aspose.OMR API in your project.
|
|
4
|
+
|
|
5
|
+
## Quickstart
|
|
6
|
+
|
|
7
|
+
You can perform tasks out of the box without writing a single line of code with our [GUI client](https://github.com/aspose-omr-cloud/aspose-omr-cloud-dotnet/releases). You can also refer to the [client documentation](https://docs.aspose.cloud/display/omrcloud/Aspose.OMR.Client+Application).
|
|
8
|
+
|
|
9
|
+
## Using OMR Cloud API in your Ruby projects
|
|
10
|
+
|
|
11
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
12
|
+
|
|
13
|
+
- API version: 1.1
|
|
14
|
+
- Package version: 1.0.0
|
|
15
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
Ruby 2.3 and later
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### Build a gem
|
|
23
|
+
|
|
24
|
+
To build the Ruby code into a gem:
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
gem build asposeomrcloud.gemspec
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then either install the gem locally:
|
|
31
|
+
|
|
32
|
+
```shell
|
|
33
|
+
gem install ./asposeomrcloud-1.0.0.gem
|
|
34
|
+
```
|
|
35
|
+
(for development, run `gem install --dev ./asposeomrcloud-1.0.0.gem` to install the development dependencies)
|
|
36
|
+
|
|
37
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
38
|
+
|
|
39
|
+
Finally add this to the Gemfile:
|
|
40
|
+
|
|
41
|
+
gem 'asposeomrcloud', '~> 1.0.0'
|
|
42
|
+
|
|
43
|
+
### Install from Git
|
|
44
|
+
|
|
45
|
+
If the Ruby gem is hosted at a git repository: https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby, then add the following in the Gemfile:
|
|
46
|
+
|
|
47
|
+
gem 'asposeomrcloud', :git => 'https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby.git'
|
|
48
|
+
|
|
49
|
+
### Include the Ruby code directly
|
|
50
|
+
|
|
51
|
+
Include the Ruby code directly using `-I` as follows:
|
|
52
|
+
|
|
53
|
+
```shell
|
|
54
|
+
ruby -Ilib script.rb
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Optional requirements
|
|
58
|
+
|
|
59
|
+
To take full advantage of Aspose.OMR for Cloud, _aspose/storage-sdk-ruby_ is required. Just run `gem install aspose_storage_cloud`. You may refer to official [Aspose Storage SDK](https://github.com/aspose-storage-cloud/aspose-storage-cloud-ruby) to get more information.
|
|
60
|
+
|
|
61
|
+
## Usage
|
|
62
|
+
|
|
63
|
+
### Receive Cloud Keys
|
|
64
|
+
Aspose.Cloud credentials are required to use Aspose.OMR for Cloud API. You can acquire App SID and App Key by registrating at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud). It will take only a couple of minutes.
|
|
65
|
+
|
|
66
|
+
### Code example
|
|
67
|
+
You can check out [OMR Demo](demo) project to get started with Aspose.OMR for Cloud.
|
|
68
|
+
|
|
69
|
+
## Documentation for API Endpoints
|
|
70
|
+
|
|
71
|
+
All URIs are relative to *https://api.aspose.cloud/v1.1*
|
|
72
|
+
|
|
73
|
+
Class | Method | HTTP request | Description
|
|
74
|
+
------------ | ------------- | ------------- | -------------
|
|
75
|
+
*AsposeOmrCloud::OmrApi* | [**post_run_omr_task**](docs/OmrApi.md#post_run_omr_task) | **POST** /omr/{name}/runOmrTask | Run specific OMR task
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## Documentation for Models
|
|
79
|
+
|
|
80
|
+
- [AsposeOmrCloud::AsposeResponse](docs/AsposeResponse.md)
|
|
81
|
+
- [AsposeOmrCloud::FileInfo](docs/FileInfo.md)
|
|
82
|
+
- [AsposeOmrCloud::OMRFunctionParam](docs/OMRFunctionParam.md)
|
|
83
|
+
- [AsposeOmrCloud::OMRResponseDetails](docs/OMRResponseDetails.md)
|
|
84
|
+
- [AsposeOmrCloud::OmrResponseContent](docs/OmrResponseContent.md)
|
|
85
|
+
- [AsposeOmrCloud::OmrResponseInfo](docs/OmrResponseInfo.md)
|
|
86
|
+
- [AsposeOmrCloud::Payload](docs/Payload.md)
|
|
87
|
+
- [AsposeOmrCloud::RecognitionStatistics](docs/RecognitionStatistics.md)
|
|
88
|
+
- [AsposeOmrCloud::ServerStat](docs/ServerStat.md)
|
|
89
|
+
- [AsposeOmrCloud::OMRResponse](docs/OMRResponse.md)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Authentication
|
|
93
|
+
|
|
94
|
+
Library uses OAUTH2 internally
|
|
95
|
+
|
|
96
|
+
## Author
|
|
97
|
+
|
|
98
|
+
Aspose Pty Ltd (https://www.aspose.com)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# AsposeOmrCloud::AsposeResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**status** | **String** | Indicates operation's status | [optional]
|
|
7
|
+
|
|
8
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
9
|
+
|
data/docs/FileInfo.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# AsposeOmrCloud::FileInfo
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**name** | **String** | Name of the file | [optional]
|
|
7
|
+
**size** | **Integer** | Size of the image in bytes |
|
|
8
|
+
**data** | **String** | File data packed in base64 string | [optional]
|
|
9
|
+
|
|
10
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
11
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AsposeOmrCloud::OMRFunctionParam
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**function_param** | **String** | FunctionParam depends on operation | [optional]
|
|
7
|
+
**additional_param** | **String** | AdditionalParam depends on operation | [optional]
|
|
8
|
+
|
|
9
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
10
|
+
|
data/docs/OMRResponse.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AsposeOmrCloud::OMRResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**status** | **String** | Indicates operation's status | [optional]
|
|
7
|
+
**error_code** | **Integer** | Integer field that indicates whether any critical errors occured during task execution | [optional]
|
|
8
|
+
**error_text** | **String** | String description of occured critical error. Empty if no critical errors occured | [optional]
|
|
9
|
+
**payload** | [**Payload**](Payload.md) | Payload | [optional]
|
|
10
|
+
**server_stat** | [**ServerStat**](ServerStat.md) | Server statistics | [optional]
|
|
11
|
+
|
|
12
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
13
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# AsposeOmrCloud::OMRResponseDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**task_messages** | **Array<String>** | Warnings and other messages regarding task, etc. | [optional]
|
|
7
|
+
**task_result** | **String** | Indicates if each particular task passed or failed, | [optional]
|
|
8
|
+
**recognition_statistics** | [**Array<RecognitionStatistics>**](RecognitionStatistics.md) | RecognitionStatistics | [optional]
|
|
9
|
+
|
|
10
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
11
|
+
|
data/docs/OmrApi.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# AsposeOmrCloud::OmrApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.aspose.cloud/v1.1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**post_run_omr_task**](OmrApi.md#post_run_omr_task) | **POST** /omr/{name}/runOmrTask | Run specific OMR task
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# **post_run_omr_task**
|
|
11
|
+
> OMRResponse post_run_omr_task(name, action_name, opts)
|
|
12
|
+
|
|
13
|
+
Run specific OMR task
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Parameters
|
|
17
|
+
|
|
18
|
+
Name | Type | Description | Notes
|
|
19
|
+
------------- | ------------- | ------------- | -------------
|
|
20
|
+
**name** | **String**| Name of the file to recognize. |
|
|
21
|
+
**action_name** | **String**| Action name ['CorrectTemplate', 'FinalizeTemplate', 'RecognizeImage'] |
|
|
22
|
+
**param** | [**OMRFunctionParam**](OMRFunctionParam.md)| Function params, specific for each actionName | [optional]
|
|
23
|
+
**storage** | **String**| Image's storage. | [optional]
|
|
24
|
+
**folder** | **String**| Image's folder. | [optional]
|
|
25
|
+
|
|
26
|
+
### Return type
|
|
27
|
+
|
|
28
|
+
[**OMRResponse**](OMRResponse.md)
|
|
29
|
+
|
|
30
|
+
### Authorization
|
|
31
|
+
|
|
32
|
+
Library uses OAUTH2 authorization internally
|
|
33
|
+
|
|
34
|
+
### HTTP request headers
|
|
35
|
+
|
|
36
|
+
- **Content-Type**: application/json
|
|
37
|
+
- **Accept**: application/json
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AsposeOmrCloud::OmrResponseContent
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**template_id** | **String** | GUID string that is used to identify template on server This value is assigned after Template Correction and used later in Template Finalization and Image Recognition | [optional]
|
|
7
|
+
**execution_time** | **Float** | Indicates how long it took to perform task on server. |
|
|
8
|
+
**response_files** | [**Array<FileInfo>**](FileInfo.md) | This structure holds array of files returned in response Type and content of files differes depending on action | [optional]
|
|
9
|
+
**info** | [**OmrResponseInfo**](OmrResponseInfo.md) | | [optional]
|
|
10
|
+
|
|
11
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AsposeOmrCloud::OmrResponseInfo
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**response_version** | **String** | String value representing version of the response. | [optional]
|
|
7
|
+
**processed_tasks_count** | **Integer** | Total amount of processed tasks |
|
|
8
|
+
**successful_tasks_count** | **Integer** | Total amount of successful tasks, i.e. tasks that completed without errors |
|
|
9
|
+
**details** | [**OMRResponseDetails**](OMRResponseDetails.md) | Additional information regarding performed task. | [optional]
|
|
10
|
+
|
|
11
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
12
|
+
|
data/docs/Payload.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# AsposeOmrCloud::Payload
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**result** | [**OmrResponseContent**](OmrResponseContent.md) | OMR result | [optional]
|
|
7
|
+
|
|
8
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
9
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AsposeOmrCloud::RecognitionStatistics
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**name** | **String** | Gets or sets Name | [optional]
|
|
7
|
+
**task_messages** | **Array<String>** | Warnings and other messages regarding task, etc. | [optional]
|
|
8
|
+
**task_result** | **String** | Indicates if each particular task passed or failed, | [optional]
|
|
9
|
+
**run_seconds** | **Float** | Gets or sets RunSeconds |
|
|
10
|
+
|
|
11
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
12
|
+
|
data/docs/ServerStat.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AsposeOmrCloud::ServerStat
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**storage_download_time** | **String** | Get or set StorageDownloadTime |
|
|
7
|
+
**omr_function_call_time** | **String** | Get or set OmrFunctionCallTime |
|
|
8
|
+
|
|
9
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
10
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
Copyright (c) 2018 Aspose Pty Ltd. All Rights Reserved.
|
|
3
|
+
|
|
4
|
+
Licensed under the MIT (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby/blob/master/LICENSE
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#Aspose.OMR for Cloud API Reference
|
|
18
|
+
|
|
19
|
+
#Aspose.OMR for Cloud helps performing optical mark recognition in the cloud
|
|
20
|
+
|
|
21
|
+
OpenAPI spec version: 1.1
|
|
22
|
+
|
|
23
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
24
|
+
Swagger Codegen version: 3.0.0-SNAPSHOT
|
|
25
|
+
|
|
26
|
+
=end
|
|
27
|
+
|
|
28
|
+
# Common files
|
|
29
|
+
require 'aspose_omr_cloud/api_client'
|
|
30
|
+
require 'aspose_omr_cloud/api_error'
|
|
31
|
+
require 'aspose_omr_cloud/version'
|
|
32
|
+
require 'aspose_omr_cloud/configuration'
|
|
33
|
+
|
|
34
|
+
# Models
|
|
35
|
+
require 'aspose_omr_cloud/models/aspose_response'
|
|
36
|
+
require 'aspose_omr_cloud/models/file_info'
|
|
37
|
+
require 'aspose_omr_cloud/models/omr_function_param'
|
|
38
|
+
require 'aspose_omr_cloud/models/omr_response_details'
|
|
39
|
+
require 'aspose_omr_cloud/models/omr_response_content'
|
|
40
|
+
require 'aspose_omr_cloud/models/omr_response_info'
|
|
41
|
+
require 'aspose_omr_cloud/models/payload'
|
|
42
|
+
require 'aspose_omr_cloud/models/recognition_statistics'
|
|
43
|
+
require 'aspose_omr_cloud/models/server_stat'
|
|
44
|
+
require 'aspose_omr_cloud/models/omr_response'
|
|
45
|
+
|
|
46
|
+
# APIs
|
|
47
|
+
require 'aspose_omr_cloud/api/omr_api'
|
|
48
|
+
|
|
49
|
+
module AsposeOmrCloud
|
|
50
|
+
class << self
|
|
51
|
+
# Customize default settings for the SDK using block.
|
|
52
|
+
# AsposeOmrCloud.configure do |config|
|
|
53
|
+
# config.username = "xxx"
|
|
54
|
+
# config.password = "xxx"
|
|
55
|
+
# end
|
|
56
|
+
# If no block given, return the default Configuration object.
|
|
57
|
+
def configure
|
|
58
|
+
if block_given?
|
|
59
|
+
yield(Configuration.default)
|
|
60
|
+
else
|
|
61
|
+
Configuration.default
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
Copyright (c) 2018 Aspose Pty Ltd. All Rights Reserved.
|
|
3
|
+
|
|
4
|
+
Licensed under the MIT (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://github.com/aspose-omr-cloud/aspose-omr-cloud-ruby/blob/master/LICENSE
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#Aspose.OMR for Cloud API Reference
|
|
18
|
+
|
|
19
|
+
#Aspose.OMR for Cloud helps performing optical mark recognition in the cloud
|
|
20
|
+
|
|
21
|
+
OpenAPI spec version: 1.1
|
|
22
|
+
|
|
23
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
24
|
+
Swagger Codegen version: 3.0.0-SNAPSHOT
|
|
25
|
+
|
|
26
|
+
=end
|
|
27
|
+
|
|
28
|
+
require "uri"
|
|
29
|
+
|
|
30
|
+
module AsposeOmrCloud
|
|
31
|
+
class OmrApi
|
|
32
|
+
attr_accessor :api_client
|
|
33
|
+
|
|
34
|
+
# OmrApi constructor
|
|
35
|
+
#
|
|
36
|
+
# @param app_key App Key
|
|
37
|
+
# @param app_sid App SID
|
|
38
|
+
# @param base_path Base Path
|
|
39
|
+
# @param debugging debugging (true to enable, false to disable)
|
|
40
|
+
# @param api_client custom instance of ApiClient class
|
|
41
|
+
def initialize(app_key, app_sid, base_path = nil, debugging = false, api_client = ApiClient.default)
|
|
42
|
+
@api_client = api_client
|
|
43
|
+
@api_client.config.app_key = app_key if app_key
|
|
44
|
+
@api_client.config.app_sid = app_sid if app_sid
|
|
45
|
+
@api_client.config.debugging = debugging
|
|
46
|
+
if base_path
|
|
47
|
+
uri = URI.parse(base_path)
|
|
48
|
+
@api_client.config.scheme = uri.scheme
|
|
49
|
+
if uri.port.to_s.empty?
|
|
50
|
+
@api_client.config.host = uri.host
|
|
51
|
+
else
|
|
52
|
+
@api_client.config.host = "#{uri.host}:#{uri.port}"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Run specific OMR task
|
|
58
|
+
#
|
|
59
|
+
# @param name Name of the file to recognize.
|
|
60
|
+
# @param action_name Action name ['CorrectTemplate', 'FinalizeTemplate', 'RecognizeImage']
|
|
61
|
+
# @param [Hash] opts the optional parameters
|
|
62
|
+
# @option opts [OMRFunctionParam] :param Function params, specific for each actionName
|
|
63
|
+
# @option opts [String] :storage Image's storage.
|
|
64
|
+
# @option opts [String] :folder Image's folder.
|
|
65
|
+
# @return [OMRResponse]
|
|
66
|
+
def post_run_omr_task(name, action_name, opts = {})
|
|
67
|
+
data, _status_code, _headers = post_run_omr_task_with_http_info(name, action_name, opts)
|
|
68
|
+
return data
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Run specific OMR task
|
|
72
|
+
#
|
|
73
|
+
# @param name Name of the file to recognize.
|
|
74
|
+
# @param action_name Action name ['CorrectTemplate', 'FinalizeTemplate', 'RecognizeImage']
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @option opts [OMRFunctionParam] :param Function params, specific for each actionName
|
|
77
|
+
# @option opts [String] :storage Image's storage.
|
|
78
|
+
# @option opts [String] :folder Image's folder.
|
|
79
|
+
# @return [Array<(OMRResponse, Fixnum, Hash)>] OMRResponse data, response status code and response headers
|
|
80
|
+
def post_run_omr_task_with_http_info(name, action_name, opts = {})
|
|
81
|
+
if @api_client.config.debugging
|
|
82
|
+
@api_client.config.logger.debug "Calling API: OmrApi.post_run_omr_task ..."
|
|
83
|
+
end
|
|
84
|
+
# verify the required parameter 'name' is set
|
|
85
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
86
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling OmrApi.post_run_omr_task"
|
|
87
|
+
end
|
|
88
|
+
# verify the required parameter 'action_name' is set
|
|
89
|
+
if @api_client.config.client_side_validation && action_name.nil?
|
|
90
|
+
fail ArgumentError, "Missing the required parameter 'action_name' when calling OmrApi.post_run_omr_task"
|
|
91
|
+
end
|
|
92
|
+
# resource path
|
|
93
|
+
local_var_path = "/omr/{name}/runOmrTask".sub('{' + 'name' + '}', name.to_s)
|
|
94
|
+
|
|
95
|
+
# query parameters
|
|
96
|
+
query_params = {}
|
|
97
|
+
query_params[:'actionName'] = action_name
|
|
98
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
|
99
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
|
100
|
+
|
|
101
|
+
# header parameters
|
|
102
|
+
header_params = {}
|
|
103
|
+
# HTTP header 'Accept' (if needed)
|
|
104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
105
|
+
# HTTP header 'Content-Type'
|
|
106
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
107
|
+
|
|
108
|
+
# form parameters
|
|
109
|
+
form_params = {}
|
|
110
|
+
|
|
111
|
+
# http body (model)
|
|
112
|
+
post_body = @api_client.object_to_http_body(opts[:'param'])
|
|
113
|
+
auth_names = ['oauth']
|
|
114
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
115
|
+
:header_params => header_params,
|
|
116
|
+
:query_params => query_params,
|
|
117
|
+
:form_params => form_params,
|
|
118
|
+
:body => post_body,
|
|
119
|
+
:auth_names => auth_names,
|
|
120
|
+
:return_type => 'OMRResponse')
|
|
121
|
+
if @api_client.config.debugging
|
|
122
|
+
@api_client.config.logger.debug "API called: OmrApi#post_run_omr_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
123
|
+
end
|
|
124
|
+
return data, status_code, headers
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|