All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_variant | POST /flags/{flagID}/variants | |
delete_variant | DELETE /flags/{flagID}/variants/{variantID} | |
find_variants | GET /flags/{flagID}/variants | |
put_variant | PUT /flags/{flagID}/variants/{variantID} |
Variant create_variant(flag_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::VariantApi.new
flag_id = 789 # Integer | numeric ID of the flag
body = Flagr::CreateVariantRequest.new # CreateVariantRequest | create a variant
begin
result = api_instance.create_variant(flag_id, body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling VariantApi->create_variant: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag | |
body | CreateVariantRequest | create a variant |
No authorization required
- Content-Type: application/json
- Accept: application/json
delete_variant(flag_id, variant_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::VariantApi.new
flag_id = 789 # Integer | numeric ID of the flag
variant_id = 789 # Integer | numeric ID of the variant
begin
api_instance.delete_variant(flag_id, variant_id)
rescue Flagr::ApiError => e
puts "Exception when calling VariantApi->delete_variant: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag | |
variant_id | Integer | numeric ID of the variant |
nil (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
Array<Variant> find_variants(flag_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::VariantApi.new
flag_id = 789 # Integer | numeric ID of the flag
begin
result = api_instance.find_variants(flag_id)
p result
rescue Flagr::ApiError => e
puts "Exception when calling VariantApi->find_variants: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
Variant put_variant(flag_id, variant_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::VariantApi.new
flag_id = 789 # Integer | numeric ID of the flag
variant_id = 789 # Integer | numeric ID of the variant
body = Flagr::PutVariantRequest.new # PutVariantRequest | update a variant
begin
result = api_instance.put_variant(flag_id, variant_id, body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling VariantApi->put_variant: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag | |
variant_id | Integer | numeric ID of the variant | |
body | PutVariantRequest | update a variant |
No authorization required
- Content-Type: application/json
- Accept: application/json