rbflagr 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Makefile +9 -0
- data/README.md +143 -0
- data/Rakefile +8 -0
- data/docs/Constraint.md +11 -0
- data/docs/ConstraintApi.md +211 -0
- data/docs/CreateConstraintRequest.md +10 -0
- data/docs/CreateFlagRequest.md +8 -0
- data/docs/CreateSegmentRequest.md +9 -0
- data/docs/CreateVariantRequest.md +9 -0
- data/docs/Distribution.md +12 -0
- data/docs/DistributionApi.md +109 -0
- data/docs/Error.md +8 -0
- data/docs/EvalContext.md +12 -0
- data/docs/EvalDebugLog.md +9 -0
- data/docs/EvalResult.md +16 -0
- data/docs/EvaluationApi.md +98 -0
- data/docs/EvaluationBatchRequest.md +10 -0
- data/docs/EvaluationBatchResponse.md +8 -0
- data/docs/EvaluationEntity.md +10 -0
- data/docs/Flag.md +13 -0
- data/docs/FlagApi.md +337 -0
- data/docs/FlagSnapshot.md +11 -0
- data/docs/HealthApi.md +46 -0
- data/docs/PutDistributionsRequest.md +8 -0
- data/docs/PutFlagRequest.md +9 -0
- data/docs/PutSegmentReorderRequest.md +8 -0
- data/docs/PutSegmentRequest.md +9 -0
- data/docs/PutVariantRequest.md +9 -0
- data/docs/Segment.md +13 -0
- data/docs/SegmentApi.md +246 -0
- data/docs/SegmentDebugLog.md +9 -0
- data/docs/SetFlagEnabledRequest.md +8 -0
- data/docs/Variant.md +10 -0
- data/docs/VariantApi.md +199 -0
- data/git_push.sh +55 -0
- data/lib/rbflagr.rb +70 -0
- data/lib/rbflagr/api/constraint_api.rb +310 -0
- data/lib/rbflagr/api/distribution_api.rb +159 -0
- data/lib/rbflagr/api/evaluation_api.rb +123 -0
- data/lib/rbflagr/api/flag_api.rb +413 -0
- data/lib/rbflagr/api/health_api.rb +66 -0
- data/lib/rbflagr/api/segment_api.rb +329 -0
- data/lib/rbflagr/api/variant_api.rb +270 -0
- data/lib/rbflagr/api_client.rb +388 -0
- data/lib/rbflagr/api_error.rb +38 -0
- data/lib/rbflagr/configuration.rb +202 -0
- data/lib/rbflagr/models/constraint.rb +317 -0
- data/lib/rbflagr/models/create_constraint_request.rb +273 -0
- data/lib/rbflagr/models/create_flag_request.rb +207 -0
- data/lib/rbflagr/models/create_segment_request.rb +249 -0
- data/lib/rbflagr/models/create_variant_request.rb +216 -0
- data/lib/rbflagr/models/distribution.rb +330 -0
- data/lib/rbflagr/models/error.rb +207 -0
- data/lib/rbflagr/models/eval_context.rb +268 -0
- data/lib/rbflagr/models/eval_debug_log.rb +194 -0
- data/lib/rbflagr/models/eval_result.rb +385 -0
- data/lib/rbflagr/models/evaluation_batch_request.rb +215 -0
- data/lib/rbflagr/models/evaluation_batch_response.rb +190 -0
- data/lib/rbflagr/models/evaluation_entity.rb +225 -0
- data/lib/rbflagr/models/flag.rb +282 -0
- data/lib/rbflagr/models/flag_snapshot.rb +263 -0
- data/lib/rbflagr/models/put_distributions_request.rb +190 -0
- data/lib/rbflagr/models/put_flag_request.rb +217 -0
- data/lib/rbflagr/models/put_segment_reorder_request.rb +190 -0
- data/lib/rbflagr/models/put_segment_request.rb +249 -0
- data/lib/rbflagr/models/put_variant_request.rb +221 -0
- data/lib/rbflagr/models/segment.rb +328 -0
- data/lib/rbflagr/models/segment_debug_log.rb +207 -0
- data/lib/rbflagr/models/set_flag_enabled_request.rb +188 -0
- data/lib/rbflagr/models/variant.rb +240 -0
- data/lib/rbflagr/version.rb +15 -0
- data/rbflagr.gemspec +45 -0
- data/spec/api/constraint_api_spec.rb +91 -0
- data/spec/api/distribution_api_spec.rb +62 -0
- data/spec/api/evaluation_api_spec.rb +47 -0
- data/spec/api/flag_api_spec.rb +108 -0
- data/spec/api/health_api_spec.rb +44 -0
- data/spec/api/segment_api_spec.rb +87 -0
- data/spec/api/variant_api_spec.rb +87 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/constraint_spec.rb +64 -0
- data/spec/models/create_constraint_request_spec.rb +54 -0
- data/spec/models/create_flag_request_spec.rb +42 -0
- data/spec/models/create_segment_request_spec.rb +48 -0
- data/spec/models/create_variant_request_spec.rb +48 -0
- data/spec/models/distribution_spec.rb +66 -0
- data/spec/models/error_spec.rb +42 -0
- data/spec/models/eval_context_spec.rb +66 -0
- data/spec/models/eval_debug_log_spec.rb +48 -0
- data/spec/models/eval_result_spec.rb +78 -0
- data/spec/models/evaluation_batch_request_spec.rb +54 -0
- data/spec/models/evaluation_batch_response_spec.rb +42 -0
- data/spec/models/evaluation_entity_spec.rb +54 -0
- data/spec/models/flag_snapshot_spec.rb +60 -0
- data/spec/models/flag_spec.rb +66 -0
- data/spec/models/put_distributions_request_spec.rb +42 -0
- data/spec/models/put_flag_request_spec.rb +42 -0
- data/spec/models/put_segment_reorder_request_spec.rb +42 -0
- data/spec/models/put_segment_request_spec.rb +48 -0
- data/spec/models/put_variant_request_spec.rb +48 -0
- data/spec/models/segment_debug_log_spec.rb +48 -0
- data/spec/models/segment_spec.rb +72 -0
- data/spec/models/set_flag_enabled_request_spec.rb +42 -0
- data/spec/models/variant_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger.yaml +1135 -0
- data/swagger_ruby.json +6 -0
- data/tags +618 -0
- metadata +362 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
# Flagr::Distribution
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**percent** | **Integer** | |
|
8
|
+
**bitmap** | **String** | | [optional]
|
9
|
+
**variant_key** | **String** | |
|
10
|
+
**variant_id** | **Integer** | |
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Flagr::DistributionApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**find_distributions**](DistributionApi.md#find_distributions) | **GET** /flags/{flagID}/segments/{segmentID}/distributions |
|
8
|
+
[**put_distributions**](DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions |
|
9
|
+
|
10
|
+
|
11
|
+
# **find_distributions**
|
12
|
+
> Array<Distribution> find_distributions(flag_id, segment_id)
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
### Example
|
17
|
+
```ruby
|
18
|
+
# load the gem
|
19
|
+
require 'rbflagr'
|
20
|
+
|
21
|
+
api_instance = Flagr::DistributionApi.new
|
22
|
+
|
23
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
24
|
+
|
25
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
26
|
+
|
27
|
+
|
28
|
+
begin
|
29
|
+
result = api_instance.find_distributions(flag_id, segment_id)
|
30
|
+
p result
|
31
|
+
rescue Flagr::ApiError => e
|
32
|
+
puts "Exception when calling DistributionApi->find_distributions: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
### Parameters
|
37
|
+
|
38
|
+
Name | Type | Description | Notes
|
39
|
+
------------- | ------------- | ------------- | -------------
|
40
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
41
|
+
**segment_id** | **Integer**| numeric ID of the segment |
|
42
|
+
|
43
|
+
### Return type
|
44
|
+
|
45
|
+
[**Array<Distribution>**](Distribution.md)
|
46
|
+
|
47
|
+
### Authorization
|
48
|
+
|
49
|
+
No authorization required
|
50
|
+
|
51
|
+
### HTTP request headers
|
52
|
+
|
53
|
+
- **Content-Type**: application/json
|
54
|
+
- **Accept**: application/json
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
# **put_distributions**
|
59
|
+
> Array<Distribution> put_distributions(flag_id, segment_id, body)
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
replace the distribution with the new setting
|
64
|
+
|
65
|
+
### Example
|
66
|
+
```ruby
|
67
|
+
# load the gem
|
68
|
+
require 'rbflagr'
|
69
|
+
|
70
|
+
api_instance = Flagr::DistributionApi.new
|
71
|
+
|
72
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
73
|
+
|
74
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
75
|
+
|
76
|
+
body = Flagr::PutDistributionsRequest.new # PutDistributionsRequest | array of distributions
|
77
|
+
|
78
|
+
|
79
|
+
begin
|
80
|
+
result = api_instance.put_distributions(flag_id, segment_id, body)
|
81
|
+
p result
|
82
|
+
rescue Flagr::ApiError => e
|
83
|
+
puts "Exception when calling DistributionApi->put_distributions: #{e}"
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
### Parameters
|
88
|
+
|
89
|
+
Name | Type | Description | Notes
|
90
|
+
------------- | ------------- | ------------- | -------------
|
91
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
92
|
+
**segment_id** | **Integer**| numeric ID of the segment |
|
93
|
+
**body** | [**PutDistributionsRequest**](PutDistributionsRequest.md)| array of distributions |
|
94
|
+
|
95
|
+
### Return type
|
96
|
+
|
97
|
+
[**Array<Distribution>**](Distribution.md)
|
98
|
+
|
99
|
+
### Authorization
|
100
|
+
|
101
|
+
No authorization required
|
102
|
+
|
103
|
+
### HTTP request headers
|
104
|
+
|
105
|
+
- **Content-Type**: application/json
|
106
|
+
- **Accept**: application/json
|
107
|
+
|
108
|
+
|
109
|
+
|
data/docs/Error.md
ADDED
data/docs/EvalContext.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Flagr::EvalContext
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**entity_id** | **String** | entityID is used to deterministically at random to evaluate the flag result. If it's empty, flagr will randomly generate one. | [optional]
|
7
|
+
**entity_type** | **String** | |
|
8
|
+
**entity_context** | **Object** | | [optional]
|
9
|
+
**enable_debug** | **BOOLEAN** | | [optional]
|
10
|
+
**flag_id** | **Integer** | |
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Flagr::EvalDebugLog
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**segment_debug_logs** | [**Array<SegmentDebugLog>**](SegmentDebugLog.md) | | [optional]
|
7
|
+
**msg** | **String** | | [optional]
|
8
|
+
|
9
|
+
|
data/docs/EvalResult.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Flagr::EvalResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**flag_id** | **Integer** | |
|
7
|
+
**flag_snapshot_id** | **Integer** | | [optional]
|
8
|
+
**segment_id** | **Integer** | |
|
9
|
+
**variant_id** | **Integer** | |
|
10
|
+
**variant_key** | **String** | |
|
11
|
+
**variant_attachment** | **Object** | |
|
12
|
+
**eval_context** | [**EvalContext**](EvalContext.md) | |
|
13
|
+
**timestamp** | **String** | |
|
14
|
+
**eval_debug_log** | [**EvalDebugLog**](EvalDebugLog.md) | | [optional]
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# Flagr::EvaluationApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**post_evaluation**](EvaluationApi.md#post_evaluation) | **POST** /evaluation |
|
8
|
+
[**post_evaluation_batch**](EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch |
|
9
|
+
|
10
|
+
|
11
|
+
# **post_evaluation**
|
12
|
+
> EvalResult post_evaluation(body)
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
### Example
|
17
|
+
```ruby
|
18
|
+
# load the gem
|
19
|
+
require 'rbflagr'
|
20
|
+
|
21
|
+
api_instance = Flagr::EvaluationApi.new
|
22
|
+
|
23
|
+
body = Flagr::EvalContext.new # EvalContext | evalution context
|
24
|
+
|
25
|
+
|
26
|
+
begin
|
27
|
+
result = api_instance.post_evaluation(body)
|
28
|
+
p result
|
29
|
+
rescue Flagr::ApiError => e
|
30
|
+
puts "Exception when calling EvaluationApi->post_evaluation: #{e}"
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
### Parameters
|
35
|
+
|
36
|
+
Name | Type | Description | Notes
|
37
|
+
------------- | ------------- | ------------- | -------------
|
38
|
+
**body** | [**EvalContext**](EvalContext.md)| evalution context |
|
39
|
+
|
40
|
+
### Return type
|
41
|
+
|
42
|
+
[**EvalResult**](EvalResult.md)
|
43
|
+
|
44
|
+
### Authorization
|
45
|
+
|
46
|
+
No authorization required
|
47
|
+
|
48
|
+
### HTTP request headers
|
49
|
+
|
50
|
+
- **Content-Type**: application/json
|
51
|
+
- **Accept**: application/json
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
# **post_evaluation_batch**
|
56
|
+
> EvaluationBatchResponse post_evaluation_batch(body)
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
### Example
|
61
|
+
```ruby
|
62
|
+
# load the gem
|
63
|
+
require 'rbflagr'
|
64
|
+
|
65
|
+
api_instance = Flagr::EvaluationApi.new
|
66
|
+
|
67
|
+
body = Flagr::EvaluationBatchRequest.new # EvaluationBatchRequest | evalution batch request
|
68
|
+
|
69
|
+
|
70
|
+
begin
|
71
|
+
result = api_instance.post_evaluation_batch(body)
|
72
|
+
p result
|
73
|
+
rescue Flagr::ApiError => e
|
74
|
+
puts "Exception when calling EvaluationApi->post_evaluation_batch: #{e}"
|
75
|
+
end
|
76
|
+
```
|
77
|
+
|
78
|
+
### Parameters
|
79
|
+
|
80
|
+
Name | Type | Description | Notes
|
81
|
+
------------- | ------------- | ------------- | -------------
|
82
|
+
**body** | [**EvaluationBatchRequest**](EvaluationBatchRequest.md)| evalution batch request |
|
83
|
+
|
84
|
+
### Return type
|
85
|
+
|
86
|
+
[**EvaluationBatchResponse**](EvaluationBatchResponse.md)
|
87
|
+
|
88
|
+
### Authorization
|
89
|
+
|
90
|
+
No authorization required
|
91
|
+
|
92
|
+
### HTTP request headers
|
93
|
+
|
94
|
+
- **Content-Type**: application/json
|
95
|
+
- **Accept**: application/json
|
96
|
+
|
97
|
+
|
98
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Flagr::EvaluationBatchRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**entities** | [**Array<EvaluationEntity>**](EvaluationEntity.md) | |
|
7
|
+
**enable_debug** | **BOOLEAN** | | [optional]
|
8
|
+
**flag_i_ds** | **Array<Integer>** | |
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Flagr::EvaluationEntity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**entity_id** | **String** | | [optional]
|
7
|
+
**entity_type** | **String** | |
|
8
|
+
**entity_context** | **Object** | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/Flag.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Flagr::Flag
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | | [optional]
|
7
|
+
**description** | **String** | |
|
8
|
+
**enabled** | **BOOLEAN** | |
|
9
|
+
**segments** | [**Array<Segment>**](Segment.md) | | [optional]
|
10
|
+
**variants** | [**Array<Variant>**](Variant.md) | | [optional]
|
11
|
+
**data_records_enabled** | **BOOLEAN** | enabled data records will get data logging in the metrics pipeline, for example, kafka. |
|
12
|
+
|
13
|
+
|
data/docs/FlagApi.md
ADDED
@@ -0,0 +1,337 @@
|
|
1
|
+
# Flagr::FlagApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_flag**](FlagApi.md#create_flag) | **POST** /flags |
|
8
|
+
[**delete_flag**](FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} |
|
9
|
+
[**find_flags**](FlagApi.md#find_flags) | **GET** /flags |
|
10
|
+
[**get_flag**](FlagApi.md#get_flag) | **GET** /flags/{flagID} |
|
11
|
+
[**get_flag_snapshots**](FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots |
|
12
|
+
[**put_flag**](FlagApi.md#put_flag) | **PUT** /flags/{flagID} |
|
13
|
+
[**set_flag_enabled**](FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled |
|
14
|
+
|
15
|
+
|
16
|
+
# **create_flag**
|
17
|
+
> Flag create_flag(body)
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'rbflagr'
|
25
|
+
|
26
|
+
api_instance = Flagr::FlagApi.new
|
27
|
+
|
28
|
+
body = Flagr::CreateFlagRequest.new # CreateFlagRequest | create a flag
|
29
|
+
|
30
|
+
|
31
|
+
begin
|
32
|
+
result = api_instance.create_flag(body)
|
33
|
+
p result
|
34
|
+
rescue Flagr::ApiError => e
|
35
|
+
puts "Exception when calling FlagApi->create_flag: #{e}"
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
### Parameters
|
40
|
+
|
41
|
+
Name | Type | Description | Notes
|
42
|
+
------------- | ------------- | ------------- | -------------
|
43
|
+
**body** | [**CreateFlagRequest**](CreateFlagRequest.md)| create a flag |
|
44
|
+
|
45
|
+
### Return type
|
46
|
+
|
47
|
+
[**Flag**](Flag.md)
|
48
|
+
|
49
|
+
### Authorization
|
50
|
+
|
51
|
+
No authorization required
|
52
|
+
|
53
|
+
### HTTP request headers
|
54
|
+
|
55
|
+
- **Content-Type**: application/json
|
56
|
+
- **Accept**: application/json
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
# **delete_flag**
|
61
|
+
> delete_flag(flag_id)
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
### Example
|
66
|
+
```ruby
|
67
|
+
# load the gem
|
68
|
+
require 'rbflagr'
|
69
|
+
|
70
|
+
api_instance = Flagr::FlagApi.new
|
71
|
+
|
72
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
73
|
+
|
74
|
+
|
75
|
+
begin
|
76
|
+
api_instance.delete_flag(flag_id)
|
77
|
+
rescue Flagr::ApiError => e
|
78
|
+
puts "Exception when calling FlagApi->delete_flag: #{e}"
|
79
|
+
end
|
80
|
+
```
|
81
|
+
|
82
|
+
### Parameters
|
83
|
+
|
84
|
+
Name | Type | Description | Notes
|
85
|
+
------------- | ------------- | ------------- | -------------
|
86
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
87
|
+
|
88
|
+
### Return type
|
89
|
+
|
90
|
+
nil (empty response body)
|
91
|
+
|
92
|
+
### Authorization
|
93
|
+
|
94
|
+
No authorization required
|
95
|
+
|
96
|
+
### HTTP request headers
|
97
|
+
|
98
|
+
- **Content-Type**: application/json
|
99
|
+
- **Accept**: application/json
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
# **find_flags**
|
104
|
+
> Array<Flag> find_flags(opts)
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
### Example
|
109
|
+
```ruby
|
110
|
+
# load the gem
|
111
|
+
require 'rbflagr'
|
112
|
+
|
113
|
+
api_instance = Flagr::FlagApi.new
|
114
|
+
|
115
|
+
opts = {
|
116
|
+
limit: 789, # Integer | the numbers of flags to return
|
117
|
+
enabled: true, # BOOLEAN | return flags having given enabled status
|
118
|
+
description: 'description_example', # String | return flags exactly matching given description
|
119
|
+
description_like: 'description_like_example', # String | return flags partially matching given description
|
120
|
+
offset: 789 # Integer | return flags given the offset, it should usually set together with limit
|
121
|
+
}
|
122
|
+
|
123
|
+
begin
|
124
|
+
result = api_instance.find_flags(opts)
|
125
|
+
p result
|
126
|
+
rescue Flagr::ApiError => e
|
127
|
+
puts "Exception when calling FlagApi->find_flags: #{e}"
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
### Parameters
|
132
|
+
|
133
|
+
Name | Type | Description | Notes
|
134
|
+
------------- | ------------- | ------------- | -------------
|
135
|
+
**limit** | **Integer**| the numbers of flags to return | [optional]
|
136
|
+
**enabled** | **BOOLEAN**| return flags having given enabled status | [optional]
|
137
|
+
**description** | **String**| return flags exactly matching given description | [optional]
|
138
|
+
**description_like** | **String**| return flags partially matching given description | [optional]
|
139
|
+
**offset** | **Integer**| return flags given the offset, it should usually set together with limit | [optional]
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
[**Array<Flag>**](Flag.md)
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
No authorization required
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: application/json
|
152
|
+
- **Accept**: application/json
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
# **get_flag**
|
157
|
+
> Flag get_flag(flag_id)
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
### Example
|
162
|
+
```ruby
|
163
|
+
# load the gem
|
164
|
+
require 'rbflagr'
|
165
|
+
|
166
|
+
api_instance = Flagr::FlagApi.new
|
167
|
+
|
168
|
+
flag_id = 789 # Integer | numeric ID of the flag to get
|
169
|
+
|
170
|
+
|
171
|
+
begin
|
172
|
+
result = api_instance.get_flag(flag_id)
|
173
|
+
p result
|
174
|
+
rescue Flagr::ApiError => e
|
175
|
+
puts "Exception when calling FlagApi->get_flag: #{e}"
|
176
|
+
end
|
177
|
+
```
|
178
|
+
|
179
|
+
### Parameters
|
180
|
+
|
181
|
+
Name | Type | Description | Notes
|
182
|
+
------------- | ------------- | ------------- | -------------
|
183
|
+
**flag_id** | **Integer**| numeric ID of the flag to get |
|
184
|
+
|
185
|
+
### Return type
|
186
|
+
|
187
|
+
[**Flag**](Flag.md)
|
188
|
+
|
189
|
+
### Authorization
|
190
|
+
|
191
|
+
No authorization required
|
192
|
+
|
193
|
+
### HTTP request headers
|
194
|
+
|
195
|
+
- **Content-Type**: application/json
|
196
|
+
- **Accept**: application/json
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
# **get_flag_snapshots**
|
201
|
+
> Array<FlagSnapshot> get_flag_snapshots(flag_id)
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
### Example
|
206
|
+
```ruby
|
207
|
+
# load the gem
|
208
|
+
require 'rbflagr'
|
209
|
+
|
210
|
+
api_instance = Flagr::FlagApi.new
|
211
|
+
|
212
|
+
flag_id = 789 # Integer | numeric ID of the flag to get
|
213
|
+
|
214
|
+
|
215
|
+
begin
|
216
|
+
result = api_instance.get_flag_snapshots(flag_id)
|
217
|
+
p result
|
218
|
+
rescue Flagr::ApiError => e
|
219
|
+
puts "Exception when calling FlagApi->get_flag_snapshots: #{e}"
|
220
|
+
end
|
221
|
+
```
|
222
|
+
|
223
|
+
### Parameters
|
224
|
+
|
225
|
+
Name | Type | Description | Notes
|
226
|
+
------------- | ------------- | ------------- | -------------
|
227
|
+
**flag_id** | **Integer**| numeric ID of the flag to get |
|
228
|
+
|
229
|
+
### Return type
|
230
|
+
|
231
|
+
[**Array<FlagSnapshot>**](FlagSnapshot.md)
|
232
|
+
|
233
|
+
### Authorization
|
234
|
+
|
235
|
+
No authorization required
|
236
|
+
|
237
|
+
### HTTP request headers
|
238
|
+
|
239
|
+
- **Content-Type**: application/json
|
240
|
+
- **Accept**: application/json
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
# **put_flag**
|
245
|
+
> Flag put_flag(flag_id, body)
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
### Example
|
250
|
+
```ruby
|
251
|
+
# load the gem
|
252
|
+
require 'rbflagr'
|
253
|
+
|
254
|
+
api_instance = Flagr::FlagApi.new
|
255
|
+
|
256
|
+
flag_id = 789 # Integer | numeric ID of the flag to get
|
257
|
+
|
258
|
+
body = Flagr::PutFlagRequest.new # PutFlagRequest | update a flag
|
259
|
+
|
260
|
+
|
261
|
+
begin
|
262
|
+
result = api_instance.put_flag(flag_id, body)
|
263
|
+
p result
|
264
|
+
rescue Flagr::ApiError => e
|
265
|
+
puts "Exception when calling FlagApi->put_flag: #{e}"
|
266
|
+
end
|
267
|
+
```
|
268
|
+
|
269
|
+
### Parameters
|
270
|
+
|
271
|
+
Name | Type | Description | Notes
|
272
|
+
------------- | ------------- | ------------- | -------------
|
273
|
+
**flag_id** | **Integer**| numeric ID of the flag to get |
|
274
|
+
**body** | [**PutFlagRequest**](PutFlagRequest.md)| update a flag |
|
275
|
+
|
276
|
+
### Return type
|
277
|
+
|
278
|
+
[**Flag**](Flag.md)
|
279
|
+
|
280
|
+
### Authorization
|
281
|
+
|
282
|
+
No authorization required
|
283
|
+
|
284
|
+
### HTTP request headers
|
285
|
+
|
286
|
+
- **Content-Type**: application/json
|
287
|
+
- **Accept**: application/json
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
# **set_flag_enabled**
|
292
|
+
> Flag set_flag_enabled(flag_id, body)
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
### Example
|
297
|
+
```ruby
|
298
|
+
# load the gem
|
299
|
+
require 'rbflagr'
|
300
|
+
|
301
|
+
api_instance = Flagr::FlagApi.new
|
302
|
+
|
303
|
+
flag_id = 789 # Integer | numeric ID of the flag to get
|
304
|
+
|
305
|
+
body = Flagr::SetFlagEnabledRequest.new # SetFlagEnabledRequest | set flag enabled state
|
306
|
+
|
307
|
+
|
308
|
+
begin
|
309
|
+
result = api_instance.set_flag_enabled(flag_id, body)
|
310
|
+
p result
|
311
|
+
rescue Flagr::ApiError => e
|
312
|
+
puts "Exception when calling FlagApi->set_flag_enabled: #{e}"
|
313
|
+
end
|
314
|
+
```
|
315
|
+
|
316
|
+
### Parameters
|
317
|
+
|
318
|
+
Name | Type | Description | Notes
|
319
|
+
------------- | ------------- | ------------- | -------------
|
320
|
+
**flag_id** | **Integer**| numeric ID of the flag to get |
|
321
|
+
**body** | [**SetFlagEnabledRequest**](SetFlagEnabledRequest.md)| set flag enabled state |
|
322
|
+
|
323
|
+
### Return type
|
324
|
+
|
325
|
+
[**Flag**](Flag.md)
|
326
|
+
|
327
|
+
### Authorization
|
328
|
+
|
329
|
+
No authorization required
|
330
|
+
|
331
|
+
### HTTP request headers
|
332
|
+
|
333
|
+
- **Content-Type**: application/json
|
334
|
+
- **Accept**: application/json
|
335
|
+
|
336
|
+
|
337
|
+
|