espadav8 / phpflagr
0.1.0
2019-02-15 12:19 UTC
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.14
- phpunit/phpunit: ^8.0
- squizlabs/php_codesniffer: ~3.4
This package is auto-updated.
Last update: 2024-11-16 04:47:54 UTC
README
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 0.1.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/espadav8/phpflagr.git"
}
],
"require": {
"espadav8/phpflagr": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to//vendor/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'); $apiInstance = new EspadaV8\PHPFlagr\Api\ConstraintApi( // 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() ); $flagID = 789; // int | numeric ID of the flag $segmentID = 789; // int | numeric ID of the segment $body = new \EspadaV8\PHPFlagr\Model\CreateConstraintRequest(); // \EspadaV8\PHPFlagr\Model\CreateConstraintRequest | create a constraint try { $result = $apiInstance->createConstraint($flagID, $segmentID, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling ConstraintApi->createConstraint: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to http://localhost/api/v1
Documentation For Models
- Constraint
- CreateConstraintRequest
- CreateFlagRequest
- CreateSegmentRequest
- CreateVariantRequest
- Distribution
- Error
- EvalContext
- EvalDebugLog
- EvalResult
- EvaluationBatchRequest
- EvaluationBatchResponse
- EvaluationEntity
- Flag
- FlagSnapshot
- PutDistributionsRequest
- PutFlagRequest
- PutSegmentReorderRequest
- PutSegmentRequest
- PutVariantRequest
- Segment
- SegmentDebugLog
- SetFlagEnabledRequest
- Variant
Documentation For Authorization
All endpoints do not require authorization.