ayinkellc / otito-php-sdk
Otito PHP SDK. Generated from swagger file
dev-main
2023-06-10 13:40 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-12-10 16:54:01 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; }