Tinq\Workflows
Official Tinq.ai PHP SDK.
All URIs are relative to https://tinq.ai/api/v2, except if the operation defines another base path.
createWorkflow()
createWorkflow($content_type, $accept, $body)
Create workflow
Create a workflow.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Workflows(
// 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
);
$content_type = application/json; // string
$accept = application/json; // string
$body = array('key' => new \stdClass); // object
try {
$apiInstance->createWorkflow($content_type, $accept, $body);
} catch (Exception $e) {
echo 'Exception when calling Workflows->createWorkflow: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|
content_type | string | | [optional] |
accept | string | | [optional] |
body | object | | [optional] |
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]
executeWorkflow()
executeWorkflow($workflow_slug, $content_type, $accept, $body)
Execute workflow
Execute a workflow
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Workflows(
// 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
);
$workflow_slug = 'workflow_slug_example'; // string
$content_type = application/json; // string
$accept = application/json; // string
$body = array('key' => new \stdClass); // object
try {
$apiInstance->executeWorkflow($workflow_slug, $content_type, $accept, $body);
} catch (Exception $e) {
echo 'Exception when calling Workflows->executeWorkflow: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|
workflow_slug | string | | |
content_type | string | | [optional] |
accept | string | | [optional] |
body | object | | [optional] |
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]
getOneWorkflow()
getOneWorkflow($workflow_slug, $accept, $content_type)
Get one workflow
Get one workflow
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Workflows(
// 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
);
$workflow_slug = 'workflow_slug_example'; // string
$accept = application/json; // string
$content_type = application/json; // string
try {
$apiInstance->getOneWorkflow($workflow_slug, $accept, $content_type);
} catch (Exception $e) {
echo 'Exception when calling Workflows->getOneWorkflow: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|
workflow_slug | string | | |
accept | string | | [optional] |
content_type | string | | [optional] |
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]
getWorkflows()
Get workflows
List all user’s workflows
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Workflows(
// 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
);
try {
$apiInstance->getWorkflows();
} catch (Exception $e) {
echo 'Exception when calling Workflows->getWorkflows: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]