Skip to content

Commit

Permalink
Merge pull request #15 from aspose-email-cloud/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Marat-Gumerov authored Oct 27, 2020
2 parents 3b7c00f + c78269d commit 556d8e3
Show file tree
Hide file tree
Showing 649 changed files with 41,935 additions and 2,618 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ Aspose.Email Cloud is a REST API for creating email applications that work with
- Email configuration discovery.
- Disposable email address detection.

## New features in version 20.9
## New features in version 20.10

Aspose.Email Cloud SDK 20.9.0 is based on a new v4.0 REST API.
Aspose.Email Cloud 20.10.0 comes with SDK improvements:

- All SDK functions are divided into groups (Email, Calendar, Contact, Client, Ai, Mapi, etc.).
- Unified file API provided for supported file types (Save, Get, Convert, AsFile, FromFile, AsMapi/AsDto).
- HierarchicalObject based API is removed.
- All models are stored in one folder/namespace.
- The request models are simplified.
- Typescript, PHP, Java SDKs now have model builders to simplify their initialization.
- All SDK methods now have code examples with parameters initialization.
- Some models now have initialization examples for all SDKs.
- SDK reference documentation with examples now available at url [docs.aspose.cloud/email/reference-api](https://docs.aspose.cloud/email/reference-api/)

See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-9-release-notes/).
See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-10-release-notes/).

## How to use the SDK?
The complete source code is available in the [GIT repository](https://github.com/aspose-email-cloud/aspose-email-cloud-php/tree/master/src/Aspose/Email).
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "This repository contains Aspose Cloud SDK for PHP source code. Aspose Cloud SDK for PHP lets PHP developers convert and process a variety of file formats in the cloud quickly and easily.",
"name": "aspose/aspose-email-cloud",
"type": "library",
"version": "20.9.0",
"version": "20.10.0.123",
"license": "MIT",
"keywords": [
"aspose",
Expand Down
269 changes: 237 additions & 32 deletions doc/AiBcrApi.md
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. \&quot;it\&quot; or \&quot;ita\&quot; for Italian); it&#39;s \&quot;\&quot; 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)
4 changes: 1 addition & 3 deletions doc/AiBcrApi_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
All URIs are relative to *https://api.aspose.cloud/v4.0*

Method | HTTP request | Description
------------- | ------------- | -------------
------ | ------------ | -----------
[**parse**](AiBcrApi.md#parse) | **PUT** /email/AiBcr/parse | Parse images to vCard document models
[**parseStorage**](AiBcrApi.md#parseStorage) | **PUT** /email/AiBcr/parse-storage | Parse images from storage to vCard files

6 changes: 4 additions & 2 deletions doc/AiBcrImage.md
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)

19 changes: 17 additions & 2 deletions doc/AiBcrImageStorageFile.md
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)

Loading

0 comments on commit 556d8e3

Please sign in to comment.