PHP code example of metatavu / pakkasmarja-client-php
1. Go to this page and download the library: Download metatavu/pakkasmarja-client-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
metatavu / pakkasmarja-client-php example snippets
onfigure API key authorization: bearer
Metatavu\Pakkasmarja\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Metatavu\Pakkasmarja\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$api_instance = new Metatavu\Pakkasmarja\Api\ChatThreadsApi();
$threadId = 789; // int | chat thread id
$type = "type_example"; // string | report type. Accepted values summaryReport
$accept = "accept_example"; // string | Expected response format. Accepted values application/vnd.openxmlformats for Excel response
try {
$result = $api_instance->getChatThreadReport($threadId, $type, $accept);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChatThreadsApi->getChatThreadReport: ', $e->getMessage(), PHP_EOL;
}