rbflagr 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6d581712bb92f0f0bc0dcf1bd36fae8f9ed8e5511147bde6ed674f018ef8402b
|
|
4
|
+
data.tar.gz: 35f793dab20335bd32c8b8602b178cfd580ddaa5eb20a21759821f21be2eb6a6
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 41dd88e56157dd2ca3df30e5bf40b4bd487c3c93634da94d0d331f0827274045426f4ef75c1d73426e4a5cb48fac7ccd351a091239ed4545aaa512b74dad1002
|
|
7
|
+
data.tar.gz: c3b140e97a2c4921df97ccd8d89669de4eeb65d378549d317a1419e5457a063fc7dab72e90f028b523059ca57a9281347cbedc499d2cdfb9f50c5f3a2596f162
|
data/Gemfile
ADDED
data/Makefile
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# make sure swagger.yaml and swagger_ruby.json is update-to-date
|
|
2
|
+
gen:
|
|
3
|
+
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate \
|
|
4
|
+
-i /local/swagger.yaml \
|
|
5
|
+
-l ruby \
|
|
6
|
+
-o /local/ -c /local/swagger_ruby.json
|
|
7
|
+
find ./rbflagr.gemspec -type f -exec sed -i "" "s/'json', '~> 2.1', '>= 2.1.0'/'json'/g" {} +
|
|
8
|
+
find ./.gitignore -type f -exec sed -i "" "s/# Gemfile.lock/Gemfile.lock/g" {} +
|
|
9
|
+
echo "\n## Use Makefile\n\`make gen\`\n" >> ./README.md
|
data/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# rbflagr
|
|
2
|
+
|
|
3
|
+
Flagr - the Ruby gem for the Flagr
|
|
4
|
+
|
|
5
|
+
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
|
|
6
|
+
|
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
8
|
+
|
|
9
|
+
- API version: 1.0.8
|
|
10
|
+
- Package version: 0.1.2
|
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### Build a gem
|
|
16
|
+
|
|
17
|
+
To build the Ruby code into a gem:
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
gem build rbflagr.gemspec
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then either install the gem locally:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
gem install ./rbflagr-0.1.2.gem
|
|
27
|
+
```
|
|
28
|
+
(for development, run `gem install --dev ./rbflagr-0.1.2.gem` to install the development dependencies)
|
|
29
|
+
|
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
31
|
+
|
|
32
|
+
Finally add this to the Gemfile:
|
|
33
|
+
|
|
34
|
+
gem 'rbflagr', '~> 0.1.2'
|
|
35
|
+
|
|
36
|
+
### Install from Git
|
|
37
|
+
|
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
|
39
|
+
|
|
40
|
+
gem 'rbflagr', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
41
|
+
|
|
42
|
+
### Include the Ruby code directly
|
|
43
|
+
|
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
|
45
|
+
|
|
46
|
+
```shell
|
|
47
|
+
ruby -Ilib script.rb
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Getting Started
|
|
51
|
+
|
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
53
|
+
```ruby
|
|
54
|
+
# Load the gem
|
|
55
|
+
require 'rbflagr'
|
|
56
|
+
|
|
57
|
+
api_instance = Flagr::ConstraintApi.new
|
|
58
|
+
|
|
59
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
|
60
|
+
|
|
61
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
|
62
|
+
|
|
63
|
+
body = Flagr::CreateConstraintRequest.new # CreateConstraintRequest | create a constraint
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
begin
|
|
67
|
+
result = api_instance.create_constraint(flag_id, segment_id, body)
|
|
68
|
+
p result
|
|
69
|
+
rescue Flagr::ApiError => e
|
|
70
|
+
puts "Exception when calling ConstraintApi->create_constraint: #{e}"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Documentation for API Endpoints
|
|
76
|
+
|
|
77
|
+
All URIs are relative to *http://localhost/api/v1*
|
|
78
|
+
|
|
79
|
+
Class | Method | HTTP request | Description
|
|
80
|
+
------------ | ------------- | ------------- | -------------
|
|
81
|
+
*Flagr::ConstraintApi* | [**create_constraint**](docs/ConstraintApi.md#create_constraint) | **POST** /flags/{flagID}/segments/{segmentID}/constraints |
|
|
82
|
+
*Flagr::ConstraintApi* | [**delete_constraint**](docs/ConstraintApi.md#delete_constraint) | **DELETE** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} |
|
|
83
|
+
*Flagr::ConstraintApi* | [**find_constraints**](docs/ConstraintApi.md#find_constraints) | **GET** /flags/{flagID}/segments/{segmentID}/constraints |
|
|
84
|
+
*Flagr::ConstraintApi* | [**put_constraint**](docs/ConstraintApi.md#put_constraint) | **PUT** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} |
|
|
85
|
+
*Flagr::DistributionApi* | [**find_distributions**](docs/DistributionApi.md#find_distributions) | **GET** /flags/{flagID}/segments/{segmentID}/distributions |
|
|
86
|
+
*Flagr::DistributionApi* | [**put_distributions**](docs/DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions |
|
|
87
|
+
*Flagr::EvaluationApi* | [**post_evaluation**](docs/EvaluationApi.md#post_evaluation) | **POST** /evaluation |
|
|
88
|
+
*Flagr::EvaluationApi* | [**post_evaluation_batch**](docs/EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch |
|
|
89
|
+
*Flagr::FlagApi* | [**create_flag**](docs/FlagApi.md#create_flag) | **POST** /flags |
|
|
90
|
+
*Flagr::FlagApi* | [**delete_flag**](docs/FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} |
|
|
91
|
+
*Flagr::FlagApi* | [**find_flags**](docs/FlagApi.md#find_flags) | **GET** /flags |
|
|
92
|
+
*Flagr::FlagApi* | [**get_flag**](docs/FlagApi.md#get_flag) | **GET** /flags/{flagID} |
|
|
93
|
+
*Flagr::FlagApi* | [**get_flag_snapshots**](docs/FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots |
|
|
94
|
+
*Flagr::FlagApi* | [**put_flag**](docs/FlagApi.md#put_flag) | **PUT** /flags/{flagID} |
|
|
95
|
+
*Flagr::FlagApi* | [**set_flag_enabled**](docs/FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled |
|
|
96
|
+
*Flagr::HealthApi* | [**health_get**](docs/HealthApi.md#health_get) | **GET** /health |
|
|
97
|
+
*Flagr::SegmentApi* | [**create_segment**](docs/SegmentApi.md#create_segment) | **POST** /flags/{flagID}/segments |
|
|
98
|
+
*Flagr::SegmentApi* | [**delete_segment**](docs/SegmentApi.md#delete_segment) | **DELETE** /flags/{flagID}/segments/{segmentID} |
|
|
99
|
+
*Flagr::SegmentApi* | [**find_segments**](docs/SegmentApi.md#find_segments) | **GET** /flags/{flagID}/segments |
|
|
100
|
+
*Flagr::SegmentApi* | [**put_segment**](docs/SegmentApi.md#put_segment) | **PUT** /flags/{flagID}/segments/{segmentID} |
|
|
101
|
+
*Flagr::SegmentApi* | [**put_segments_reorder**](docs/SegmentApi.md#put_segments_reorder) | **PUT** /flags/{flagID}/segments/reorder |
|
|
102
|
+
*Flagr::VariantApi* | [**create_variant**](docs/VariantApi.md#create_variant) | **POST** /flags/{flagID}/variants |
|
|
103
|
+
*Flagr::VariantApi* | [**delete_variant**](docs/VariantApi.md#delete_variant) | **DELETE** /flags/{flagID}/variants/{variantID} |
|
|
104
|
+
*Flagr::VariantApi* | [**find_variants**](docs/VariantApi.md#find_variants) | **GET** /flags/{flagID}/variants |
|
|
105
|
+
*Flagr::VariantApi* | [**put_variant**](docs/VariantApi.md#put_variant) | **PUT** /flags/{flagID}/variants/{variantID} |
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## Documentation for Models
|
|
109
|
+
|
|
110
|
+
- [Flagr::Constraint](docs/Constraint.md)
|
|
111
|
+
- [Flagr::CreateConstraintRequest](docs/CreateConstraintRequest.md)
|
|
112
|
+
- [Flagr::CreateFlagRequest](docs/CreateFlagRequest.md)
|
|
113
|
+
- [Flagr::CreateSegmentRequest](docs/CreateSegmentRequest.md)
|
|
114
|
+
- [Flagr::CreateVariantRequest](docs/CreateVariantRequest.md)
|
|
115
|
+
- [Flagr::Distribution](docs/Distribution.md)
|
|
116
|
+
- [Flagr::Error](docs/Error.md)
|
|
117
|
+
- [Flagr::EvalContext](docs/EvalContext.md)
|
|
118
|
+
- [Flagr::EvalDebugLog](docs/EvalDebugLog.md)
|
|
119
|
+
- [Flagr::EvalResult](docs/EvalResult.md)
|
|
120
|
+
- [Flagr::EvaluationBatchRequest](docs/EvaluationBatchRequest.md)
|
|
121
|
+
- [Flagr::EvaluationBatchResponse](docs/EvaluationBatchResponse.md)
|
|
122
|
+
- [Flagr::EvaluationEntity](docs/EvaluationEntity.md)
|
|
123
|
+
- [Flagr::Flag](docs/Flag.md)
|
|
124
|
+
- [Flagr::FlagSnapshot](docs/FlagSnapshot.md)
|
|
125
|
+
- [Flagr::PutDistributionsRequest](docs/PutDistributionsRequest.md)
|
|
126
|
+
- [Flagr::PutFlagRequest](docs/PutFlagRequest.md)
|
|
127
|
+
- [Flagr::PutSegmentReorderRequest](docs/PutSegmentReorderRequest.md)
|
|
128
|
+
- [Flagr::PutSegmentRequest](docs/PutSegmentRequest.md)
|
|
129
|
+
- [Flagr::PutVariantRequest](docs/PutVariantRequest.md)
|
|
130
|
+
- [Flagr::Segment](docs/Segment.md)
|
|
131
|
+
- [Flagr::SegmentDebugLog](docs/SegmentDebugLog.md)
|
|
132
|
+
- [Flagr::SetFlagEnabledRequest](docs/SetFlagEnabledRequest.md)
|
|
133
|
+
- [Flagr::Variant](docs/Variant.md)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## Documentation for Authorization
|
|
137
|
+
|
|
138
|
+
All endpoints do not require authorization.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## Use Makefile
|
|
142
|
+
`make gen`
|
|
143
|
+
|
data/Rakefile
ADDED
data/docs/Constraint.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Flagr::Constraint
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **Integer** | | [optional]
|
|
7
|
+
**property** | **String** | |
|
|
8
|
+
**operator** | **String** | |
|
|
9
|
+
**value** | **String** | |
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Flagr::ConstraintApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost/api/v1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**create_constraint**](ConstraintApi.md#create_constraint) | **POST** /flags/{flagID}/segments/{segmentID}/constraints |
|
|
8
|
+
[**delete_constraint**](ConstraintApi.md#delete_constraint) | **DELETE** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} |
|
|
9
|
+
[**find_constraints**](ConstraintApi.md#find_constraints) | **GET** /flags/{flagID}/segments/{segmentID}/constraints |
|
|
10
|
+
[**put_constraint**](ConstraintApi.md#put_constraint) | **PUT** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# **create_constraint**
|
|
14
|
+
> Constraint create_constraint(flag_id, segment_id, body)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
```ruby
|
|
20
|
+
# load the gem
|
|
21
|
+
require 'rbflagr'
|
|
22
|
+
|
|
23
|
+
api_instance = Flagr::ConstraintApi.new
|
|
24
|
+
|
|
25
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
|
26
|
+
|
|
27
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
|
28
|
+
|
|
29
|
+
body = Flagr::CreateConstraintRequest.new # CreateConstraintRequest | create a constraint
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
begin
|
|
33
|
+
result = api_instance.create_constraint(flag_id, segment_id, body)
|
|
34
|
+
p result
|
|
35
|
+
rescue Flagr::ApiError => e
|
|
36
|
+
puts "Exception when calling ConstraintApi->create_constraint: #{e}"
|
|
37
|
+
end
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Parameters
|
|
41
|
+
|
|
42
|
+
Name | Type | Description | Notes
|
|
43
|
+
------------- | ------------- | ------------- | -------------
|
|
44
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
|
45
|
+
**segment_id** | **Integer**| numeric ID of the segment |
|
|
46
|
+
**body** | [**CreateConstraintRequest**](CreateConstraintRequest.md)| create a constraint |
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
[**Constraint**](Constraint.md)
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
No authorization required
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: application/json
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# **delete_constraint**
|
|
64
|
+
> delete_constraint(flag_id, segment_id, constraint_id)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Example
|
|
69
|
+
```ruby
|
|
70
|
+
# load the gem
|
|
71
|
+
require 'rbflagr'
|
|
72
|
+
|
|
73
|
+
api_instance = Flagr::ConstraintApi.new
|
|
74
|
+
|
|
75
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
|
76
|
+
|
|
77
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
|
78
|
+
|
|
79
|
+
constraint_id = 789 # Integer | numeric ID of the constraint
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
begin
|
|
83
|
+
api_instance.delete_constraint(flag_id, segment_id, constraint_id)
|
|
84
|
+
rescue Flagr::ApiError => e
|
|
85
|
+
puts "Exception when calling ConstraintApi->delete_constraint: #{e}"
|
|
86
|
+
end
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Parameters
|
|
90
|
+
|
|
91
|
+
Name | Type | Description | Notes
|
|
92
|
+
------------- | ------------- | ------------- | -------------
|
|
93
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
|
94
|
+
**segment_id** | **Integer**| numeric ID of the segment |
|
|
95
|
+
**constraint_id** | **Integer**| numeric ID of the constraint |
|
|
96
|
+
|
|
97
|
+
### Return type
|
|
98
|
+
|
|
99
|
+
nil (empty response body)
|
|
100
|
+
|
|
101
|
+
### Authorization
|
|
102
|
+
|
|
103
|
+
No authorization required
|
|
104
|
+
|
|
105
|
+
### HTTP request headers
|
|
106
|
+
|
|
107
|
+
- **Content-Type**: application/json
|
|
108
|
+
- **Accept**: application/json
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# **find_constraints**
|
|
113
|
+
> Array<Constraint> find_constraints(flag_id, segment_id)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Example
|
|
118
|
+
```ruby
|
|
119
|
+
# load the gem
|
|
120
|
+
require 'rbflagr'
|
|
121
|
+
|
|
122
|
+
api_instance = Flagr::ConstraintApi.new
|
|
123
|
+
|
|
124
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
|
125
|
+
|
|
126
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
begin
|
|
130
|
+
result = api_instance.find_constraints(flag_id, segment_id)
|
|
131
|
+
p result
|
|
132
|
+
rescue Flagr::ApiError => e
|
|
133
|
+
puts "Exception when calling ConstraintApi->find_constraints: #{e}"
|
|
134
|
+
end
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Parameters
|
|
138
|
+
|
|
139
|
+
Name | Type | Description | Notes
|
|
140
|
+
------------- | ------------- | ------------- | -------------
|
|
141
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
|
142
|
+
**segment_id** | **Integer**| numeric ID of the segment |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
[**Array<Constraint>**](Constraint.md)
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
No authorization required
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: application/json
|
|
155
|
+
- **Accept**: application/json
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# **put_constraint**
|
|
160
|
+
> Constraint put_constraint(flag_id, segment_id, constraint_id, body)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
### Example
|
|
165
|
+
```ruby
|
|
166
|
+
# load the gem
|
|
167
|
+
require 'rbflagr'
|
|
168
|
+
|
|
169
|
+
api_instance = Flagr::ConstraintApi.new
|
|
170
|
+
|
|
171
|
+
flag_id = 789 # Integer | numeric ID of the flag
|
|
172
|
+
|
|
173
|
+
segment_id = 789 # Integer | numeric ID of the segment
|
|
174
|
+
|
|
175
|
+
constraint_id = 789 # Integer | numeric ID of the constraint
|
|
176
|
+
|
|
177
|
+
body = Flagr::CreateConstraintRequest.new # CreateConstraintRequest | create a constraint
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
begin
|
|
181
|
+
result = api_instance.put_constraint(flag_id, segment_id, constraint_id, body)
|
|
182
|
+
p result
|
|
183
|
+
rescue Flagr::ApiError => e
|
|
184
|
+
puts "Exception when calling ConstraintApi->put_constraint: #{e}"
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Parameters
|
|
189
|
+
|
|
190
|
+
Name | Type | Description | Notes
|
|
191
|
+
------------- | ------------- | ------------- | -------------
|
|
192
|
+
**flag_id** | **Integer**| numeric ID of the flag |
|
|
193
|
+
**segment_id** | **Integer**| numeric ID of the segment |
|
|
194
|
+
**constraint_id** | **Integer**| numeric ID of the constraint |
|
|
195
|
+
**body** | [**CreateConstraintRequest**](CreateConstraintRequest.md)| create a constraint |
|
|
196
|
+
|
|
197
|
+
### Return type
|
|
198
|
+
|
|
199
|
+
[**Constraint**](Constraint.md)
|
|
200
|
+
|
|
201
|
+
### Authorization
|
|
202
|
+
|
|
203
|
+
No authorization required
|
|
204
|
+
|
|
205
|
+
### HTTP request headers
|
|
206
|
+
|
|
207
|
+
- **Content-Type**: application/json
|
|
208
|
+
- **Accept**: application/json
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|