devcycle / php-server-sdk
Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs.
Installs: 1 564
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 6
Forks: 0
Open Issues: 1
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
README
Welcome to the the DevCycle PHP SDK, initially generated via the DevCycle Bucketing API.
Requirements
PHP 7.3 and later.
Installation
Composer Installation
To install the bindings via Composer, add the following to composer.json
:
{ "require": { "devcycle/php-server-sdk": "*" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/DevCycle/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: bearerAuth $config = DevCycle\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); $apiInstance = new DevCycle\Api\DVCClient( $config, // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), ); $user_data = new \DevCycle\Model\UserData(array( "user_id"=>"my-user" )); // \DevCycle\Model\UserData try { $result = $apiInstance->allFeatures($user_data); print_r($result); } catch (Exception $e) { echo 'Exception when calling DVCClient->allFeatures: ', $e->getMessage(), PHP_EOL; }
Usage
To find usage documentation, visit our docs.