All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_segment | POST /flags/{flagID}/segments | |
delete_segment | DELETE /flags/{flagID}/segments/{segmentID} | |
find_segments | GET /flags/{flagID}/segments | |
put_segment | PUT /flags/{flagID}/segments/{segmentID} | |
put_segments_reorder | PUT /flags/{flagID}/segments/reorder |
Segment create_segment(flag_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::SegmentApi.new
flag_id = 789 # Integer | numeric ID of the flag to get
body = Flagr::CreateSegmentRequest.new # CreateSegmentRequest | create a segment under a flag
begin
result = api_instance.create_segment(flag_id, body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling SegmentApi->create_segment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag to get | |
body | CreateSegmentRequest | create a segment under a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
delete_segment(flag_id, segment_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::SegmentApi.new
flag_id = 789 # Integer | numeric ID of the flag
segment_id = 789 # Integer | numeric ID of the segment
begin
api_instance.delete_segment(flag_id, segment_id)
rescue Flagr::ApiError => e
puts "Exception when calling SegmentApi->delete_segment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag | |
segment_id | Integer | numeric ID of the segment |
nil (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
Array<Segment> find_segments(flag_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::SegmentApi.new
flag_id = 789 # Integer | numeric ID of the flag to get
begin
result = api_instance.find_segments(flag_id)
p result
rescue Flagr::ApiError => e
puts "Exception when calling SegmentApi->find_segments: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
Segment put_segment(flag_id, segment_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::SegmentApi.new
flag_id = 789 # Integer | numeric ID of the flag
segment_id = 789 # Integer | numeric ID of the segment
body = Flagr::PutSegmentRequest.new # PutSegmentRequest | update a segment
begin
result = api_instance.put_segment(flag_id, segment_id, body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling SegmentApi->put_segment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag | |
segment_id | Integer | numeric ID of the segment | |
body | PutSegmentRequest | update a segment |
No authorization required
- Content-Type: application/json
- Accept: application/json
put_segments_reorder(flag_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::SegmentApi.new
flag_id = 789 # Integer | numeric ID of the flag
body = Flagr::PutSegmentReorderRequest.new # PutSegmentReorderRequest | reorder segments
begin
api_instance.put_segments_reorder(flag_id, body)
rescue Flagr::ApiError => e
puts "Exception when calling SegmentApi->put_segments_reorder: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag | |
body | PutSegmentReorderRequest | reorder segments |
nil (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json