ayinkellc/otito-php-sdk

Otito PHP SDK. Generated from swagger file

dev-main 2023-06-10 13:40 UTC

This package is auto-updated.

Last update: 2024-11-10 16:37:10 UTC


README

For more information, please visit https://otito.dev.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

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

composer require ayinkellc/otito-php

Then run composer install

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure API key authorization: ApiKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization','sk_YOUR_API_KEY');
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\ApplicationApi(
    // If you want use a custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

$message = new \OpenAPI\Client\Model\ServerCreateApplicationRequest("Name of Application");

try {
    $result = $apiInstance->applicationsPost($message);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationApi->applicationsPost: ', $e->getMessage(), PHP_EOL;
}