All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
createSegment | POST /flags/{flagID}/segments | |
deleteSegment | DELETE /flags/{flagID}/segments/{segmentID} | |
findSegments | GET /flags/{flagID}/segments | |
putSegment | PUT /flags/{flagID}/segments/{segmentID} | |
putSegmentsReorder | PUT /flags/{flagID}/segments/reorder |
\Flagr\Client\Model\Segment createSegment($body, $flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\SegmentApi(
// 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\CreateSegmentRequest(); // \Flagr\Client\Model\CreateSegmentRequest | create a segment under a flag
$flag_id = 789; // int | numeric ID of the flag to get
try {
$result = $apiInstance->createSegment($body, $flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SegmentApi->createSegment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\CreateSegmentRequest | create a segment under a flag | |
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteSegment($flag_id, $segment_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\SegmentApi(
// 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
$segment_id = 789; // int | numeric ID of the segment
try {
$apiInstance->deleteSegment($flag_id, $segment_id);
} catch (Exception $e) {
echo 'Exception when calling SegmentApi->deleteSegment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
segment_id | int | numeric ID of the segment |
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\Segment[] findSegments($flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\SegmentApi(
// 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 to get
try {
$result = $apiInstance->findSegments($flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SegmentApi->findSegments: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get |
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\Segment putSegment($body, $flag_id, $segment_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\SegmentApi(
// 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\PutSegmentRequest(); // \Flagr\Client\Model\PutSegmentRequest | update a segment
$flag_id = 789; // int | numeric ID of the flag
$segment_id = 789; // int | numeric ID of the segment
try {
$result = $apiInstance->putSegment($body, $flag_id, $segment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SegmentApi->putSegment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\PutSegmentRequest | update a segment | |
flag_id | int | numeric ID of the flag | |
segment_id | int | numeric ID of the segment |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
putSegmentsReorder($body, $flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\SegmentApi(
// 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\PutSegmentReorderRequest(); // \Flagr\Client\Model\PutSegmentReorderRequest | reorder segments
$flag_id = 789; // int | numeric ID of the flag
try {
$apiInstance->putSegmentsReorder($body, $flag_id);
} catch (Exception $e) {
echo 'Exception when calling SegmentApi->putSegmentsReorder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\PutSegmentReorderRequest | reorder segments | |
flag_id | int | numeric ID of the flag |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]