PHP code example of kinow-io / kinow-php-sdk

1. Go to this page and download the library: Download kinow-io/kinow-php-sdk 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/ */

    

kinow-io / kinow-php-sdk example snippets


    


onfigure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ActorsApi();
$category_id = 789; // int | Category ID to fetch
$actor_id = 789; // int | Actor ID to attach

try {
    $api_instance->attachActorToCategory($category_id, $actor_id);
} catch (Exception $e) {
    echo 'Exception when calling ActorsApi->attachActorToCategory: ', $e->getMessage(), PHP_EOL;
}


// To be done before doing anything with the SDK
// Activate debug logs
Kinow\Client\Configuration::getDefaultConfiguration()->setDebug(true);

// (optionally) Change debug file location (default is 'php://output')
Kinow\Client\Configuration::getDefaultConfiguration()->setDebugFile('php://output');