kinow-io/kinow-php-sdk

2.0.28 2023-05-12 10:26 UTC

This package is auto-updated.

Last update: 2024-12-12 14:25:53 UTC


README

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

Method 1:

To install the bindings via Composer, type in your console: composer require kinow-io/kinow-php-sdk

Method 2:

To install the bindings via Composer, add the following to composer.json:

{
    "repositories": [{
        "type": "git",
        "url": "https://github.com/kinow-io/kinow-php-sdk.git"
    }],
    "require": {
        "kinow-io/kinow-php-sdk": "^1.0"
    }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/KinowClient/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure 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;
}

?>

Enable Debug Logs

You can enable debug logging to get information about what is sent or received by the SDK. The logs will be available in the 'output' file at the root of your server.

When submitting a support request, it is best to provide the logs file for a faster resolution of your issue.

// 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');

Documentation for API Endpoints

All URIs are relative to https://api.kinow.com/api

Documentation For Models