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
PHP 5.5 and later
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
Download the files and include autoload.php
:
require_once('/path/to//vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
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;
}
?>
All URIs are relative to http://localhost/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ConstraintApi | createConstraint | POST /flags/{flagID}/segments/{segmentID}/constraints | |
ConstraintApi | deleteConstraint | DELETE /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
ConstraintApi | findConstraints | GET /flags/{flagID}/segments/{segmentID}/constraints | |
ConstraintApi | putConstraint | PUT /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
DistributionApi | findDistributions | GET /flags/{flagID}/segments/{segmentID}/distributions | |
DistributionApi | putDistributions | PUT /flags/{flagID}/segments/{segmentID}/distributions | |
EvaluationApi | postEvaluation | POST /evaluation | |
EvaluationApi | postEvaluationBatch | POST /evaluation/batch | |
FlagApi | createFlag | POST /flags | |
FlagApi | deleteFlag | DELETE /flags/{flagID} | |
FlagApi | findFlags | GET /flags | |
FlagApi | getFlag | GET /flags/{flagID} | |
FlagApi | getFlagSnapshots | GET /flags/{flagID}/snapshots | |
FlagApi | putFlag | PUT /flags/{flagID} | |
FlagApi | setFlagEnabled | PUT /flags/{flagID}/enabled | |
SegmentApi | createSegment | POST /flags/{flagID}/segments | |
SegmentApi | deleteSegment | DELETE /flags/{flagID}/segments/{segmentID} | |
SegmentApi | findSegments | GET /flags/{flagID}/segments | |
SegmentApi | putSegment | PUT /flags/{flagID}/segments/{segmentID} | |
SegmentApi | putSegmentsReorder | PUT /flags/{flagID}/segments/reorder | |
VariantApi | createVariant | POST /flags/{flagID}/variants | |
VariantApi | deleteVariant | DELETE /flags/{flagID}/variants/{variantID} | |
VariantApi | findVariants | GET /flags/{flagID}/variants | |
VariantApi | putVariant | PUT /flags/{flagID}/variants/{variantID} |
- Constraint
- CreateConstraintRequest
- CreateFlagRequest
- CreateSegmentRequest
- CreateVariantRequest
- Distribution
- Error
- EvalContext
- EvalDebugLog
- EvalResult
- EvaluationBatchRequest
- EvaluationBatchResponse
- EvaluationEntity
- Flag
- FlagSnapshot
- PutDistributionsRequest
- PutFlagRequest
- PutSegmentReorderRequest
- PutSegmentRequest
- PutVariantRequest
- Segment
- SegmentDebugLog
- SetFlagEnabledRequest
- Variant
All endpoints do not require authorization.