Skip to content

Commit

Permalink
Motion capture API
Browse files Browse the repository at this point in the history
  • Loading branch information
joaogoncalves-onfido committed Nov 21, 2022
1 parent f0a00e9 commit e2e6679
Show file tree
Hide file tree
Showing 12 changed files with 3,187 additions and 636 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Onfido API is used to submit check requests.
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 3.0.0
- Package version: 6.4.0
- Package version: 6.5.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen

## Requirements
Expand All @@ -25,7 +25,7 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
}
],
"require": {
"onfido/api-php-client": "^6.4.0"
"onfido/api-php-client": "^6.5.0"
}
}
```
Expand Down Expand Up @@ -121,22 +121,26 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**downloadDocument**](docs/Api/DefaultApi.md#downloaddocument) | **GET** /documents/{document_id}/download | Download a documents raw data
*DefaultApi* | [**downloadLivePhoto**](docs/Api/DefaultApi.md#downloadlivephoto) | **GET** /live_photos/{live_photo_id}/download | Download live photo
*DefaultApi* | [**downloadLiveVideo**](docs/Api/DefaultApi.md#downloadlivevideo) | **GET** /live_videos/{live_video_id}/download | Download live video
*DefaultApi* | [**downloadMotionCapture**](docs/Api/DefaultApi.md#downloadmotioncapture) | **GET** /motion_captures/{motion_capture_id}/download | Download motion capture
*DefaultApi* | [**editWebhook**](docs/Api/DefaultApi.md#editwebhook) | **PUT** /webhooks/{webhook_id} | Edit a webhook
*DefaultApi* | [**findAddresses**](docs/Api/DefaultApi.md#findaddresses) | **GET** /addresses/pick | Search for addresses by postcode
*DefaultApi* | [**findApplicant**](docs/Api/DefaultApi.md#findapplicant) | **GET** /applicants/{applicant_id} | Retrieve Applicant
*DefaultApi* | [**findCheck**](docs/Api/DefaultApi.md#findcheck) | **GET** /checks/{check_id} | Retrieve a Check
*DefaultApi* | [**findDocument**](docs/Api/DefaultApi.md#finddocument) | **GET** /documents/{document_id} | A single document can be retrieved by calling this endpoint with the document’s unique identifier.
*DefaultApi* | [**findLivePhoto**](docs/Api/DefaultApi.md#findlivephoto) | **GET** /live_photos/{live_photo_id} | Retrieve live photo
*DefaultApi* | [**findLiveVideo**](docs/Api/DefaultApi.md#findlivevideo) | **GET** /live_videos/{live_video_id} | Retrieve live video
*DefaultApi* | [**findMotionCapture**](docs/Api/DefaultApi.md#findmotioncapture) | **GET** /motion_captures/{motion_capture_id} | Retrieve motion capture
*DefaultApi* | [**findReport**](docs/Api/DefaultApi.md#findreport) | **GET** /reports/{report_id} | A single report can be retrieved using this endpoint with the corresponding unique identifier.
*DefaultApi* | [**findWebhook**](docs/Api/DefaultApi.md#findwebhook) | **GET** /webhooks/{webhook_id} | Retrieve a Webhook
*DefaultApi* | [**frameLiveVideo**](docs/Api/DefaultApi.md#framelivevideo) | **GET** /live_videos/{live_video_id}/frame | Download live video frame
*DefaultApi* | [**frameMotionCapture**](docs/Api/DefaultApi.md#framemotioncapture) | **GET** /motion_captures/{motion_capture_id}/frame | Download motion capture frame
*DefaultApi* | [**generateSdkToken**](docs/Api/DefaultApi.md#generatesdktoken) | **POST** /sdk_token | Generate a SDK token
*DefaultApi* | [**listApplicants**](docs/Api/DefaultApi.md#listapplicants) | **GET** /applicants | List Applicants
*DefaultApi* | [**listChecks**](docs/Api/DefaultApi.md#listchecks) | **GET** /checks | Retrieve Checks
*DefaultApi* | [**listDocuments**](docs/Api/DefaultApi.md#listdocuments) | **GET** /documents | List documents
*DefaultApi* | [**listLivePhotos**](docs/Api/DefaultApi.md#listlivephotos) | **GET** /live_photos | List live photos
*DefaultApi* | [**listLiveVideos**](docs/Api/DefaultApi.md#listlivevideos) | **GET** /live_videos | List live videos
*DefaultApi* | [**listMotionCaptures**](docs/Api/DefaultApi.md#listmotioncaptures) | **GET** /motion_captures | List motion captures
*DefaultApi* | [**listReports**](docs/Api/DefaultApi.md#listreports) | **GET** /reports | All the reports belonging to a particular check can be listed from this endpoint.
*DefaultApi* | [**listWebhooks**](docs/Api/DefaultApi.md#listwebhooks) | **GET** /webhooks | List webhooks
*DefaultApi* | [**restoreApplicant**](docs/Api/DefaultApi.md#restoreapplicant) | **POST** /applicants/{applicant_id}/restore | Restore Applicant
Expand Down Expand Up @@ -167,6 +171,8 @@ Class | Method | HTTP request | Description
- [LiveVideo](docs/Model/LiveVideo.md)
- [LiveVideosList](docs/Model/LiveVideosList.md)
- [Location](docs/Model/Location.md)
- [MotionCapture](docs/Model/MotionCapture.md)
- [MotionCapturesList](docs/Model/MotionCapturesList.md)
- [Report](docs/Model/Report.md)
- [ReportDocument](docs/Model/ReportDocument.md)
- [ReportsList](docs/Model/ReportsList.md)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onfido/api-php-client",
"version": "6.4.0",
"version": "6.5.0",
"description": "The Onfido API is used to submit check requests.",
"keywords": [
"openapitools",
Expand Down
236 changes: 236 additions & 0 deletions docs/Api/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@ Method | HTTP request | Description
[**downloadDocument()**](DefaultApi.md#downloadDocument) | **GET** /documents/{document_id}/download | Download a documents raw data
[**downloadLivePhoto()**](DefaultApi.md#downloadLivePhoto) | **GET** /live_photos/{live_photo_id}/download | Download live photo
[**downloadLiveVideo()**](DefaultApi.md#downloadLiveVideo) | **GET** /live_videos/{live_video_id}/download | Download live video
[**downloadMotionCapture()**](DefaultApi.md#downloadMotionCapture) | **GET** /motion_captures/{motion_capture_id}/download | Download motion capture
[**editWebhook()**](DefaultApi.md#editWebhook) | **PUT** /webhooks/{webhook_id} | Edit a webhook
[**findAddresses()**](DefaultApi.md#findAddresses) | **GET** /addresses/pick | Search for addresses by postcode
[**findApplicant()**](DefaultApi.md#findApplicant) | **GET** /applicants/{applicant_id} | Retrieve Applicant
[**findCheck()**](DefaultApi.md#findCheck) | **GET** /checks/{check_id} | Retrieve a Check
[**findDocument()**](DefaultApi.md#findDocument) | **GET** /documents/{document_id} | A single document can be retrieved by calling this endpoint with the document’s unique identifier.
[**findLivePhoto()**](DefaultApi.md#findLivePhoto) | **GET** /live_photos/{live_photo_id} | Retrieve live photo
[**findLiveVideo()**](DefaultApi.md#findLiveVideo) | **GET** /live_videos/{live_video_id} | Retrieve live video
[**findMotionCapture()**](DefaultApi.md#findMotionCapture) | **GET** /motion_captures/{motion_capture_id} | Retrieve motion capture
[**findReport()**](DefaultApi.md#findReport) | **GET** /reports/{report_id} | A single report can be retrieved using this endpoint with the corresponding unique identifier.
[**findWebhook()**](DefaultApi.md#findWebhook) | **GET** /webhooks/{webhook_id} | Retrieve a Webhook
[**frameLiveVideo()**](DefaultApi.md#frameLiveVideo) | **GET** /live_videos/{live_video_id}/frame | Download live video frame
[**frameMotionCapture()**](DefaultApi.md#frameMotionCapture) | **GET** /motion_captures/{motion_capture_id}/frame | Download motion capture frame
[**generateSdkToken()**](DefaultApi.md#generateSdkToken) | **POST** /sdk_token | Generate a SDK token
[**listApplicants()**](DefaultApi.md#listApplicants) | **GET** /applicants | List Applicants
[**listChecks()**](DefaultApi.md#listChecks) | **GET** /checks | Retrieve Checks
[**listDocuments()**](DefaultApi.md#listDocuments) | **GET** /documents | List documents
[**listLivePhotos()**](DefaultApi.md#listLivePhotos) | **GET** /live_photos | List live photos
[**listLiveVideos()**](DefaultApi.md#listLiveVideos) | **GET** /live_videos | List live videos
[**listMotionCaptures()**](DefaultApi.md#listMotionCaptures) | **GET** /motion_captures | List motion captures
[**listReports()**](DefaultApi.md#listReports) | **GET** /reports | All the reports belonging to a particular check can be listed from this endpoint.
[**listWebhooks()**](DefaultApi.md#listWebhooks) | **GET** /webhooks | List webhooks
[**restoreApplicant()**](DefaultApi.md#restoreApplicant) | **POST** /applicants/{applicant_id}/restore | Restore Applicant
Expand Down Expand Up @@ -553,6 +557,65 @@ Name | Type | Description | Notes
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `downloadMotionCapture()`

```php
downloadMotionCapture($motion_capture_id): \SplFileObject
```

Download motion capture

Motion captures are downloaded using this endpoint.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Onfido\Configuration::getDefaultConfiguration();
$config->setApiKey('Authorization', 'token=' . 'YOUR API KEY');
$config->setApiKeyPrefix('Authorization', 'Token');

$apiInstance = new Onfido\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$motion_capture_id = 'motion_capture_id_example'; // string | The motion capture’s unique identifier.

try {
$result = $apiInstance->downloadMotionCapture($motion_capture_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->downloadMotionCapture: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**motion_capture_id** | **string**| The motion capture’s unique identifier. |

### Return type

**\SplFileObject**

### Authorization

[Token](../../README.md#Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `*/*`, `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `editWebhook()`

```php
Expand Down Expand Up @@ -954,6 +1017,63 @@ Name | Type | Description | Notes
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `findMotionCapture()`

```php
findMotionCapture($motion_capture_id): \Onfido\Model\MotionCapture
```

Retrieve motion capture

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Onfido\Configuration::getDefaultConfiguration();
$config->setApiKey('Authorization', 'token=' . 'YOUR API KEY');
$config->setApiKeyPrefix('Authorization', 'Token');

$apiInstance = new Onfido\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$motion_capture_id = 'motion_capture_id_example'; // string | The motion capture’s unique identifier.

try {
$result = $apiInstance->findMotionCapture($motion_capture_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->findMotionCapture: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**motion_capture_id** | **string**| The motion capture’s unique identifier. |

### Return type

[**\Onfido\Model\MotionCapture**](../Model/MotionCapture.md)

### Authorization

[Token](../../README.md#Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `findReport()`

```php
Expand Down Expand Up @@ -1127,6 +1247,65 @@ Name | Type | Description | Notes
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `frameMotionCapture()`

```php
frameMotionCapture($motion_capture_id): \SplFileObject
```

Download motion capture frame

Instead of the whole capture binary, a single frame can be downloaded using this endpoint. Returns the binary data representing the frame.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Onfido\Configuration::getDefaultConfiguration();
$config->setApiKey('Authorization', 'token=' . 'YOUR API KEY');
$config->setApiKeyPrefix('Authorization', 'Token');

$apiInstance = new Onfido\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$motion_capture_id = 'motion_capture_id_example'; // string | The motion capture’s unique identifier.

try {
$result = $apiInstance->frameMotionCapture($motion_capture_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->frameMotionCapture: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**motion_capture_id** | **string**| The motion capture’s unique identifier. |

### Return type

**\SplFileObject**

### Authorization

[Token](../../README.md#Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `*/*`, `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `generateSdkToken()`

```php
Expand Down Expand Up @@ -1475,6 +1654,63 @@ Name | Type | Description | Notes
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listMotionCaptures()`

```php
listMotionCaptures($applicant_id): \Onfido\Model\MotionCapturesList
```

List motion captures

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$config = Onfido\Configuration::getDefaultConfiguration();
$config->setApiKey('Authorization', 'token=' . 'YOUR API KEY');
$config->setApiKeyPrefix('Authorization', 'Token');

$apiInstance = new Onfido\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$applicant_id = 'applicant_id_example'; // string | The id of the applicant the motion captures belong to.

try {
$result = $apiInstance->listMotionCaptures($applicant_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->listMotionCaptures: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**applicant_id** | **string**| The id of the applicant the motion captures belong to. |

### Return type

[**\Onfido\Model\MotionCapturesList**](../Model/MotionCapturesList.md)

### Authorization

[Token](../../README.md#Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listReports()`

```php
Expand Down
15 changes: 15 additions & 0 deletions docs/Model/MotionCapture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# # MotionCapture

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | The unique identifier for the motion capture. | [optional]
**created_at** | **\DateTime** | The date and time at which the motion capture was uploaded. | [optional]
**href** | **string** | The uri of this resource. | [optional]
**download_href** | **string** | The uri that can be used to download the motion capture. | [optional]
**file_name** | **string** | The name of the uploaded file. | [optional]
**file_size** | **int** | The size of the file in bytes. | [optional]
**file_type** | **string** | The file type of the uploaded file. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9 changes: 9 additions & 0 deletions docs/Model/MotionCapturesList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # MotionCapturesList

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**motion_captures** | [**\Onfido\Model\MotionCapture[]**](MotionCapture.md) | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Loading

0 comments on commit e2e6679

Please sign in to comment.