All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
createVariant | POST /flags/{flagID}/variants | |
deleteVariant | DELETE /flags/{flagID}/variants/{variantID} | |
findVariants | GET /flags/{flagID}/variants | |
putVariant | PUT /flags/{flagID}/variants/{variantID} |
\Flagr\Client\Model\Variant createVariant($body, $flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\VariantApi(
// 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()
);
$body = new \Flagr\Client\Model\CreateVariantRequest(); // \Flagr\Client\Model\CreateVariantRequest | create a variant
$flag_id = 789; // int | numeric ID of the flag
try {
$result = $apiInstance->createVariant($body, $flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VariantApi->createVariant: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\CreateVariantRequest | create a variant | |
flag_id | int | numeric ID of the flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteVariant($flag_id, $variant_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\VariantApi(
// 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()
);
$flag_id = 789; // int | numeric ID of the flag
$variant_id = 789; // int | numeric ID of the variant
try {
$apiInstance->deleteVariant($flag_id, $variant_id);
} catch (Exception $e) {
echo 'Exception when calling VariantApi->deleteVariant: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
variant_id | int | numeric ID of the variant |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Variant[] findVariants($flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\VariantApi(
// 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()
);
$flag_id = 789; // int | numeric ID of the flag
try {
$result = $apiInstance->findVariants($flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VariantApi->findVariants: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Variant putVariant($body, $flag_id, $variant_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\VariantApi(
// 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()
);
$body = new \Flagr\Client\Model\PutVariantRequest(); // \Flagr\Client\Model\PutVariantRequest | update a variant
$flag_id = 789; // int | numeric ID of the flag
$variant_id = 789; // int | numeric ID of the variant
try {
$result = $apiInstance->putVariant($body, $flag_id, $variant_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VariantApi->putVariant: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\PutVariantRequest | update a variant | |
flag_id | int | numeric ID of the flag | |
variant_id | int | numeric ID of the variant |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]