-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from aspose-email-cloud/develop
Develop
- Loading branch information
Showing
649 changed files
with
41,935 additions
and
2,618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,260 @@ | ||
# Aspose\Email\AiBcrApi | ||
# AiBcrApi ($emailCloud->ai()->bcr()) | ||
|
||
# **parse** | ||
AI Business card recognition operations. | ||
|
||
## **parse** | ||
|
||
Description: Parse images to vCard document models | ||
|
||
Returns: List of vCards | ||
|
||
Method call example: | ||
```php | ||
function parse( | ||
AiBcrParseRequest $request | ||
): ContactList | ||
$result = $api->ai()->bcr()->parse($request); | ||
``` | ||
Parse images to vCard document models | ||
|
||
### Return type | ||
### Parameter: request | ||
|
||
Description: parse method request. | ||
|
||
See parameter model documentation at [AiBcrParseRequest](AiBcrParseRequest.md). | ||
|
||
[**ContactList**](ContactList.md) | ||
<details> | ||
<summary>Parameter initialization example:</summary> | ||
|
||
### Request parameters | ||
```php | ||
$request = new AiBcrParseRequest( | ||
$file, | ||
$countries, | ||
$languages, | ||
$is_single | ||
); | ||
$request = Models::AiBcrParseRequest() | ||
->file(new SplFileObject('/path/to/image.png')) | ||
->countries('us') | ||
->languages('en') | ||
->is_single(true) | ||
->build(); | ||
``` | ||
|
||
</details> | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**file** | **\SplFileObject**| File to parse | | ||
**countries** | **string**| Comma-separated codes of countries. | [optional] [default to ] | ||
**languages** | **string**| Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default. | [optional] [default to ] | ||
**is_single** | **bool**| Determines that image contains single VCard or more. | [optional] [default to true] | ||
### Result | ||
|
||
[[Back to top]](#) [[Back to README]](README.md) [[Back to Model list]](Models.md) | ||
Description: List of vCards | ||
|
||
Return type: [**ContactList**](ContactList.md) | ||
|
||
<details> | ||
<summary>Result example</summary> | ||
|
||
```php | ||
$result = Models::contactList() | ||
->value(array( | ||
Models::contactDto() | ||
->attachments(array( | ||
Models::attachment() | ||
->name('attachment.txt') | ||
->base64Data('U29tZSBmaWxlIGNvbnRlbnQ=') | ||
->build())) | ||
->displayName('Alex Thomas') | ||
->emailAddresses(array( | ||
Models::emailAddress() | ||
->category(Models::enumWithCustomOfEmailAddressCategory() | ||
->value('Custom') | ||
->description('Partners') | ||
->build()) | ||
->displayName('Alex Thomas Partners') | ||
->preferred(true) | ||
->address('[email protected]') | ||
->build())) | ||
->gender('Male') | ||
->givenName('Alex') | ||
->phoneNumbers(array( | ||
Models::phoneNumber() | ||
->category(Models::enumWithCustomOfPhoneNumberCategory() | ||
->value('Office') | ||
->build()) | ||
->number('+49 211 4247 21') | ||
->preferred(true) | ||
->build())) | ||
->profession('GENERAL DIRECTOR') | ||
->surname('Thomas') | ||
->urls(array( | ||
Models::url() | ||
->category(Models::enumWithCustomOfUrlCategory() | ||
->value('Work') | ||
->build()) | ||
->preferred(true) | ||
->href('www.aspose.com') | ||
->build())) | ||
->build())) | ||
->build(); | ||
``` | ||
</details> | ||
|
||
### Complete example | ||
|
||
# parseStorage | ||
<details> | ||
<summary>Method call example:</summary> | ||
|
||
```php | ||
function parseStorage( | ||
AiBcrParseStorageRequest $request | ||
): StorageFileLocationList | ||
$api = new EmailCloud($appKey, $appSid); | ||
|
||
// Prepare parameters: | ||
$request = Models::AiBcrParseRequest() | ||
->file(new SplFileObject('/path/to/image.png')) | ||
->countries('us') | ||
->languages('en') | ||
->is_single(true) | ||
->build(); | ||
|
||
// Call method: | ||
$result = $api->ai()->bcr()->parse($request); | ||
|
||
// Result example: | ||
$result = Models::contactList() | ||
->value(array( | ||
Models::contactDto() | ||
->attachments(array( | ||
Models::attachment() | ||
->name('attachment.txt') | ||
->base64Data('U29tZSBmaWxlIGNvbnRlbnQ=') | ||
->build())) | ||
->displayName('Alex Thomas') | ||
->emailAddresses(array( | ||
Models::emailAddress() | ||
->category(Models::enumWithCustomOfEmailAddressCategory() | ||
->value('Custom') | ||
->description('Partners') | ||
->build()) | ||
->displayName('Alex Thomas Partners') | ||
->preferred(true) | ||
->address('[email protected]') | ||
->build())) | ||
->gender('Male') | ||
->givenName('Alex') | ||
->phoneNumbers(array( | ||
Models::phoneNumber() | ||
->category(Models::enumWithCustomOfPhoneNumberCategory() | ||
->value('Office') | ||
->build()) | ||
->number('+49 211 4247 21') | ||
->preferred(true) | ||
->build())) | ||
->profession('GENERAL DIRECTOR') | ||
->surname('Thomas') | ||
->urls(array( | ||
Models::url() | ||
->category(Models::enumWithCustomOfUrlCategory() | ||
->value('Work') | ||
->build()) | ||
->preferred(true) | ||
->href('www.aspose.com') | ||
->build())) | ||
->build())) | ||
->build(); | ||
``` | ||
|
||
Parse images from storage to vCard files | ||
</details> | ||
|
||
### Return type | ||
[[Back to top]](#) [[Back to README]](README.md) [[Back to Model list]](Models.md) | ||
|
||
## parseStorage | ||
|
||
Description: Parse images from storage to vCard files | ||
|
||
Returns: List of vCard files located on storage | ||
|
||
Method call example: | ||
```php | ||
$result = $api->ai()->bcr()->parseStorage($request); | ||
``` | ||
|
||
[**StorageFileLocationList**](StorageFileLocationList.md) | ||
### Parameter: request | ||
|
||
### request Parameter | ||
Description: Request with images located on storage | ||
|
||
See parameter model documentation at [AiBcrParseStorageRequest](AiBcrParseStorageRequest.md) | ||
|
||
<details> | ||
<summary>Parameter initialization example:</summary> | ||
|
||
```php | ||
$request = Models::aiBcrParseStorageRequest() | ||
->outFolder(Models::storageFolderLocation() | ||
->storage('First Storage') | ||
->folderPath('VCard/files/produced/by/parser/will/be/placed/here') | ||
->build()) | ||
->images(array( | ||
Models::aiBcrImageStorageFile() | ||
->file(Models::storageFileLocation() | ||
->fileName('VCardScanImage.jpg') | ||
->storage('First Storage') | ||
->folderPath('image/location/on/storage') | ||
->build()) | ||
->isSingle(true) | ||
->build())) | ||
->build(); | ||
``` | ||
|
||
</details> | ||
|
||
|
||
### Result | ||
|
||
Description: List of vCard files located on storage | ||
|
||
Return type: [**StorageFileLocationList**](StorageFileLocationList.md) | ||
|
||
<details> | ||
<summary>Result example</summary> | ||
|
||
```php | ||
$result = Models::storageFileLocationList() | ||
->value(array( | ||
Models::storageFileLocation() | ||
->fileName('fileOnStorage.txt') | ||
->storage('First Storage') | ||
->folderPath('file/location/folder/on/storage') | ||
->build())) | ||
->build(); | ||
``` | ||
</details> | ||
|
||
### Complete example | ||
|
||
<details> | ||
<summary>Method call example:</summary> | ||
|
||
```php | ||
$api = new EmailCloud($appKey, $appSid); | ||
|
||
// Prepare parameters: | ||
$request = Models::aiBcrParseStorageRequest() | ||
->outFolder(Models::storageFolderLocation() | ||
->storage('First Storage') | ||
->folderPath('VCard/files/produced/by/parser/will/be/placed/here') | ||
->build()) | ||
->images(array( | ||
Models::aiBcrImageStorageFile() | ||
->file(Models::storageFileLocation() | ||
->fileName('VCardScanImage.jpg') | ||
->storage('First Storage') | ||
->folderPath('image/location/on/storage') | ||
->build()) | ||
->isSingle(true) | ||
->build())) | ||
->build(); | ||
|
||
// Call method: | ||
$result = $api->ai()->bcr()->parseStorage($request); | ||
|
||
// Result example: | ||
$result = Models::storageFileLocationList() | ||
->value(array( | ||
Models::storageFileLocation() | ||
->fileName('fileOnStorage.txt') | ||
->storage('First Storage') | ||
->folderPath('file/location/folder/on/storage') | ||
->build())) | ||
->build(); | ||
``` | ||
|
||
</details> | ||
|
||
[[Back to top]](#) [[Back to Model list]](Models.md) [[Back to README]](README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# AiBcrImage | ||
|
||
Image for recognition | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
---- | ---- | ----------- | ----- | ||
**is_single** | **bool** | Determines that image contains single VCard or more. | | ||
|
||
|
||
|
||
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) | ||
|
||
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
# AiBcrImageStorageFile | ||
|
||
Image from storage for recognition | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
---- | ---- | ----------- | ----- | ||
**file** | [**\Aspose\Email\Model\StorageFileLocation**](StorageFileLocation.md) | Image location | | ||
|
||
Parent class: [AiBcrImage](AiBcrImage.md) | ||
|
||
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) | ||
|
||
## Example | ||
```php | ||
$aiBcrImageStorageFile = Models::aiBcrImageStorageFile() | ||
->file(Models::storageFileLocation() | ||
->fileName('VCardScanImage.jpg') | ||
->storage('First Storage') | ||
->folderPath('image/location/on/storage') | ||
->build()) | ||
->isSingle(true) | ||
->build(); | ||
``` | ||
|
||
|
||
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) | ||
|
Oops, something went wrong.