rbflagr 1.1.0 → 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/README.md +14 -6
- data/docs/CreateFlagRequest.md +1 -0
- data/docs/CreateTagRequest.md +8 -0
- data/docs/EvalContext.md +1 -0
- data/docs/EvaluationBatchRequest.md +2 -1
- data/docs/ExportApi.md +54 -6
- data/docs/Flag.md +2 -0
- data/docs/FlagApi.md +2 -0
- data/docs/Health.md +8 -0
- data/docs/HealthApi.md +4 -3
- data/docs/PutFlagRequest.md +1 -0
- data/docs/Tag.md +9 -0
- data/docs/TagApi.md +198 -0
- data/lib/rbflagr.rb +6 -2
- data/lib/rbflagr/api/constraint_api.rb +2 -2
- data/lib/rbflagr/api/distribution_api.rb +2 -2
- data/lib/rbflagr/api/evaluation_api.rb +2 -2
- data/lib/rbflagr/api/export_api.rb +56 -7
- data/lib/rbflagr/api/flag_api.rb +5 -2
- data/lib/rbflagr/api/health_api.rb +8 -7
- data/lib/rbflagr/api/segment_api.rb +2 -2
- data/lib/rbflagr/api/tag_api.rb +253 -0
- data/lib/rbflagr/api/variant_api.rb +2 -2
- data/lib/rbflagr/api_client.rb +4 -2
- data/lib/rbflagr/api_error.rb +2 -2
- data/lib/rbflagr/configuration.rb +2 -2
- data/lib/rbflagr/models/constraint.rb +4 -3
- data/lib/rbflagr/models/create_constraint_request.rb +4 -3
- data/lib/rbflagr/models/create_flag_request.rb +18 -7
- data/lib/rbflagr/models/create_segment_request.rb +4 -3
- data/lib/rbflagr/models/create_tag_request.rb +208 -0
- data/lib/rbflagr/models/create_variant_request.rb +4 -3
- data/lib/rbflagr/models/distribution.rb +4 -3
- data/lib/rbflagr/models/error.rb +4 -3
- data/lib/rbflagr/models/eval_context.rb +20 -7
- data/lib/rbflagr/models/eval_debug_log.rb +4 -3
- data/lib/rbflagr/models/eval_result.rb +4 -3
- data/lib/rbflagr/models/evaluation_batch_request.rb +21 -8
- data/lib/rbflagr/models/evaluation_batch_response.rb +4 -3
- data/lib/rbflagr/models/evaluation_entity.rb +4 -3
- data/lib/rbflagr/models/flag.rb +26 -4
- data/lib/rbflagr/models/flag_snapshot.rb +4 -3
- data/lib/rbflagr/models/health.rb +184 -0
- data/lib/rbflagr/models/put_distributions_request.rb +4 -3
- data/lib/rbflagr/models/put_flag_request.rb +17 -7
- data/lib/rbflagr/models/put_segment_reorder_request.rb +4 -3
- data/lib/rbflagr/models/put_segment_request.rb +4 -3
- data/lib/rbflagr/models/put_variant_request.rb +4 -3
- data/lib/rbflagr/models/segment.rb +4 -3
- data/lib/rbflagr/models/segment_debug_log.rb +4 -3
- data/lib/rbflagr/models/set_flag_enabled_request.rb +4 -3
- data/lib/rbflagr/models/tag.rb +232 -0
- data/lib/rbflagr/models/variant.rb +4 -3
- data/lib/rbflagr/version.rb +3 -3
- data/rbflagr.gemspec +2 -2
- data/spec/api/tag_api_spec.rb +79 -0
- data/spec/models/create_tag_request_spec.rb +41 -0
- data/spec/models/health_spec.rb +41 -0
- data/spec/models/tag_spec.rb +47 -0
- data/swagger.yaml +201 -5
- data/swagger_ruby.json +1 -1
- metadata +28 -13
data/lib/rbflagr.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,6 +21,7 @@ require 'rbflagr/models/constraint'
|
|
21
21
|
require 'rbflagr/models/create_constraint_request'
|
22
22
|
require 'rbflagr/models/create_flag_request'
|
23
23
|
require 'rbflagr/models/create_segment_request'
|
24
|
+
require 'rbflagr/models/create_tag_request'
|
24
25
|
require 'rbflagr/models/create_variant_request'
|
25
26
|
require 'rbflagr/models/distribution'
|
26
27
|
require 'rbflagr/models/error'
|
@@ -32,6 +33,7 @@ require 'rbflagr/models/evaluation_batch_response'
|
|
32
33
|
require 'rbflagr/models/evaluation_entity'
|
33
34
|
require 'rbflagr/models/flag'
|
34
35
|
require 'rbflagr/models/flag_snapshot'
|
36
|
+
require 'rbflagr/models/health'
|
35
37
|
require 'rbflagr/models/put_distributions_request'
|
36
38
|
require 'rbflagr/models/put_flag_request'
|
37
39
|
require 'rbflagr/models/put_segment_reorder_request'
|
@@ -40,6 +42,7 @@ require 'rbflagr/models/put_variant_request'
|
|
40
42
|
require 'rbflagr/models/segment'
|
41
43
|
require 'rbflagr/models/segment_debug_log'
|
42
44
|
require 'rbflagr/models/set_flag_enabled_request'
|
45
|
+
require 'rbflagr/models/tag'
|
43
46
|
require 'rbflagr/models/variant'
|
44
47
|
|
45
48
|
# APIs
|
@@ -50,6 +53,7 @@ require 'rbflagr/api/export_api'
|
|
50
53
|
require 'rbflagr/api/flag_api'
|
51
54
|
require 'rbflagr/api/health_api'
|
52
55
|
require 'rbflagr/api/segment_api'
|
56
|
+
require 'rbflagr/api/tag_api'
|
53
57
|
require 'rbflagr/api/variant_api'
|
54
58
|
|
55
59
|
module Flagr
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,26 +19,75 @@ module Flagr
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Export JSON format of the eval cache dump
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [Object]
|
25
|
+
def get_export_eval_cache_json(opts = {})
|
26
|
+
data, _status_code, _headers = get_export_eval_cache_json_with_http_info(opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Export JSON format of the eval cache dump
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
33
|
+
def get_export_eval_cache_json_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: ExportApi.get_export_eval_cache_json ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/export/eval_cache/json'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = {}
|
42
|
+
|
43
|
+
# header parameters
|
44
|
+
header_params = {}
|
45
|
+
# HTTP header 'Accept' (if needed)
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
47
|
+
# HTTP header 'Content-Type'
|
48
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = nil
|
55
|
+
auth_names = []
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
57
|
+
:header_params => header_params,
|
58
|
+
:query_params => query_params,
|
59
|
+
:form_params => form_params,
|
60
|
+
:body => post_body,
|
61
|
+
:auth_names => auth_names,
|
62
|
+
:return_type => 'Object')
|
63
|
+
if @api_client.config.debugging
|
64
|
+
@api_client.config.logger.debug "API called: ExportApi#get_export_eval_cache_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
65
|
+
end
|
66
|
+
return data, status_code, headers
|
67
|
+
end
|
22
68
|
# Export sqlite3 format of the db dump, which is converted from the main database.
|
23
69
|
# @param [Hash] opts the optional parameters
|
70
|
+
# @option opts [BOOLEAN] :exclude_snapshots export without snapshots data - useful for smaller db without snapshots
|
24
71
|
# @return [File]
|
25
|
-
def
|
26
|
-
data, _status_code, _headers =
|
72
|
+
def get_export_sqlite(opts = {})
|
73
|
+
data, _status_code, _headers = get_export_sqlite_with_http_info(opts)
|
27
74
|
data
|
28
75
|
end
|
29
76
|
|
30
77
|
# Export sqlite3 format of the db dump, which is converted from the main database.
|
31
78
|
# @param [Hash] opts the optional parameters
|
79
|
+
# @option opts [BOOLEAN] :exclude_snapshots export without snapshots data - useful for smaller db without snapshots
|
32
80
|
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
33
|
-
def
|
81
|
+
def get_export_sqlite_with_http_info(opts = {})
|
34
82
|
if @api_client.config.debugging
|
35
|
-
@api_client.config.logger.debug 'Calling API: ExportApi.
|
83
|
+
@api_client.config.logger.debug 'Calling API: ExportApi.get_export_sqlite ...'
|
36
84
|
end
|
37
85
|
# resource path
|
38
86
|
local_var_path = '/export/sqlite'
|
39
87
|
|
40
88
|
# query parameters
|
41
89
|
query_params = {}
|
90
|
+
query_params[:'exclude_snapshots'] = opts[:'exclude_snapshots'] if !opts[:'exclude_snapshots'].nil?
|
42
91
|
|
43
92
|
# header parameters
|
44
93
|
header_params = {}
|
@@ -61,7 +110,7 @@ module Flagr
|
|
61
110
|
:auth_names => auth_names,
|
62
111
|
:return_type => 'File')
|
63
112
|
if @api_client.config.debugging
|
64
|
-
@api_client.config.logger.debug "API called: ExportApi#
|
113
|
+
@api_client.config.logger.debug "API called: ExportApi#get_export_sqlite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
65
114
|
end
|
66
115
|
return data, status_code, headers
|
67
116
|
end
|
data/lib/rbflagr/api/flag_api.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -126,6 +126,7 @@ module Flagr
|
|
126
126
|
# @option opts [Integer] :limit the numbers of flags to return
|
127
127
|
# @option opts [BOOLEAN] :enabled return flags having given enabled status
|
128
128
|
# @option opts [String] :description return flags exactly matching given description
|
129
|
+
# @option opts [String] :tags return flags with the given tags (comma separated)
|
129
130
|
# @option opts [String] :description_like return flags partially matching given description
|
130
131
|
# @option opts [String] :key return flags matching given key
|
131
132
|
# @option opts [Integer] :offset return flags given the offset, it should usually set together with limit
|
@@ -140,6 +141,7 @@ module Flagr
|
|
140
141
|
# @option opts [Integer] :limit the numbers of flags to return
|
141
142
|
# @option opts [BOOLEAN] :enabled return flags having given enabled status
|
142
143
|
# @option opts [String] :description return flags exactly matching given description
|
144
|
+
# @option opts [String] :tags return flags with the given tags (comma separated)
|
143
145
|
# @option opts [String] :description_like return flags partially matching given description
|
144
146
|
# @option opts [String] :key return flags matching given key
|
145
147
|
# @option opts [Integer] :offset return flags given the offset, it should usually set together with limit
|
@@ -157,6 +159,7 @@ module Flagr
|
|
157
159
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
158
160
|
query_params[:'enabled'] = opts[:'enabled'] if !opts[:'enabled'].nil?
|
159
161
|
query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
|
162
|
+
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
160
163
|
query_params[:'description_like'] = opts[:'description_like'] if !opts[:'description_like'].nil?
|
161
164
|
query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
|
162
165
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,15 +21,15 @@ module Flagr
|
|
21
21
|
end
|
22
22
|
# Check if Flagr is healthy
|
23
23
|
# @param [Hash] opts the optional parameters
|
24
|
-
# @return [
|
24
|
+
# @return [Health]
|
25
25
|
def get_health(opts = {})
|
26
|
-
get_health_with_http_info(opts)
|
27
|
-
|
26
|
+
data, _status_code, _headers = get_health_with_http_info(opts)
|
27
|
+
data
|
28
28
|
end
|
29
29
|
|
30
30
|
# Check if Flagr is healthy
|
31
31
|
# @param [Hash] opts the optional parameters
|
32
|
-
# @return [Array<(
|
32
|
+
# @return [Array<(Health, Fixnum, Hash)>] Health data, response status code and response headers
|
33
33
|
def get_health_with_http_info(opts = {})
|
34
34
|
if @api_client.config.debugging
|
35
35
|
@api_client.config.logger.debug 'Calling API: HealthApi.get_health ...'
|
@@ -58,7 +58,8 @@ module Flagr
|
|
58
58
|
:query_params => query_params,
|
59
59
|
:form_params => form_params,
|
60
60
|
:body => post_body,
|
61
|
-
:auth_names => auth_names
|
61
|
+
:auth_names => auth_names,
|
62
|
+
:return_type => 'Health')
|
62
63
|
if @api_client.config.debugging
|
63
64
|
@api_client.config.logger.debug "API called: HealthApi#get_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
64
65
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
5
|
|
6
|
-
OpenAPI spec version: 1.1.
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -0,0 +1,253 @@
|
|
1
|
+
=begin
|
2
|
+
#Flagr
|
3
|
+
|
4
|
+
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module Flagr
|
16
|
+
class TagApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# @param flag_id numeric ID of the flag
|
23
|
+
# @param body create a tag
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Tag]
|
26
|
+
def create_tag(flag_id, body, opts = {})
|
27
|
+
data, _status_code, _headers = create_tag_with_http_info(flag_id, body, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# @param flag_id numeric ID of the flag
|
32
|
+
# @param body create a tag
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(Tag, Fixnum, Hash)>] Tag data, response status code and response headers
|
35
|
+
def create_tag_with_http_info(flag_id, body, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: TagApi.create_tag ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'flag_id' is set
|
40
|
+
if @api_client.config.client_side_validation && flag_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'flag_id' when calling TagApi.create_tag"
|
42
|
+
end
|
43
|
+
if @api_client.config.client_side_validation && flag_id < 1
|
44
|
+
fail ArgumentError, 'invalid value for "flag_id" when calling TagApi.create_tag, must be greater than or equal to 1.'
|
45
|
+
end
|
46
|
+
|
47
|
+
# verify the required parameter 'body' is set
|
48
|
+
if @api_client.config.client_side_validation && body.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TagApi.create_tag"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/flags/{flagID}/tags'.sub('{' + 'flagID' + '}', flag_id.to_s)
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = @api_client.object_to_http_body(body)
|
69
|
+
auth_names = []
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => 'Tag')
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: TagApi#create_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
# @param flag_id numeric ID of the flag
|
83
|
+
# @param tag_id numeric ID of the tag
|
84
|
+
# @param [Hash] opts the optional parameters
|
85
|
+
# @return [nil]
|
86
|
+
def delete_tag(flag_id, tag_id, opts = {})
|
87
|
+
delete_tag_with_http_info(flag_id, tag_id, opts)
|
88
|
+
nil
|
89
|
+
end
|
90
|
+
|
91
|
+
# @param flag_id numeric ID of the flag
|
92
|
+
# @param tag_id numeric ID of the tag
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
95
|
+
def delete_tag_with_http_info(flag_id, tag_id, opts = {})
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug 'Calling API: TagApi.delete_tag ...'
|
98
|
+
end
|
99
|
+
# verify the required parameter 'flag_id' is set
|
100
|
+
if @api_client.config.client_side_validation && flag_id.nil?
|
101
|
+
fail ArgumentError, "Missing the required parameter 'flag_id' when calling TagApi.delete_tag"
|
102
|
+
end
|
103
|
+
if @api_client.config.client_side_validation && flag_id < 1
|
104
|
+
fail ArgumentError, 'invalid value for "flag_id" when calling TagApi.delete_tag, must be greater than or equal to 1.'
|
105
|
+
end
|
106
|
+
|
107
|
+
# verify the required parameter 'tag_id' is set
|
108
|
+
if @api_client.config.client_side_validation && tag_id.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'tag_id' when calling TagApi.delete_tag"
|
110
|
+
end
|
111
|
+
if @api_client.config.client_side_validation && tag_id < 1
|
112
|
+
fail ArgumentError, 'invalid value for "tag_id" when calling TagApi.delete_tag, must be greater than or equal to 1.'
|
113
|
+
end
|
114
|
+
|
115
|
+
# resource path
|
116
|
+
local_var_path = '/flags/{flagID}/tags/{tagID}'.sub('{' + 'flagID' + '}', flag_id.to_s).sub('{' + 'tagID' + '}', tag_id.to_s)
|
117
|
+
|
118
|
+
# query parameters
|
119
|
+
query_params = {}
|
120
|
+
|
121
|
+
# header parameters
|
122
|
+
header_params = {}
|
123
|
+
# HTTP header 'Accept' (if needed)
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
125
|
+
# HTTP header 'Content-Type'
|
126
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = nil
|
133
|
+
auth_names = []
|
134
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: TagApi#delete_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @option opts [Integer] :limit the numbers of tags to return
|
147
|
+
# @option opts [Integer] :offset return tags given the offset, it should usually set together with limit
|
148
|
+
# @option opts [String] :value_like return tags partially matching given value
|
149
|
+
# @return [Array<Tag>]
|
150
|
+
def find_all_tags(opts = {})
|
151
|
+
data, _status_code, _headers = find_all_tags_with_http_info(opts)
|
152
|
+
data
|
153
|
+
end
|
154
|
+
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [Integer] :limit the numbers of tags to return
|
157
|
+
# @option opts [Integer] :offset return tags given the offset, it should usually set together with limit
|
158
|
+
# @option opts [String] :value_like return tags partially matching given value
|
159
|
+
# @return [Array<(Array<Tag>, Fixnum, Hash)>] Array<Tag> data, response status code and response headers
|
160
|
+
def find_all_tags_with_http_info(opts = {})
|
161
|
+
if @api_client.config.debugging
|
162
|
+
@api_client.config.logger.debug 'Calling API: TagApi.find_all_tags ...'
|
163
|
+
end
|
164
|
+
# resource path
|
165
|
+
local_var_path = '/tags'
|
166
|
+
|
167
|
+
# query parameters
|
168
|
+
query_params = {}
|
169
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
170
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
171
|
+
query_params[:'value_like'] = opts[:'value_like'] if !opts[:'value_like'].nil?
|
172
|
+
|
173
|
+
# header parameters
|
174
|
+
header_params = {}
|
175
|
+
# HTTP header 'Accept' (if needed)
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
177
|
+
# HTTP header 'Content-Type'
|
178
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = nil
|
185
|
+
auth_names = []
|
186
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
187
|
+
:header_params => header_params,
|
188
|
+
:query_params => query_params,
|
189
|
+
:form_params => form_params,
|
190
|
+
:body => post_body,
|
191
|
+
:auth_names => auth_names,
|
192
|
+
:return_type => 'Array<Tag>')
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug "API called: TagApi#find_all_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
195
|
+
end
|
196
|
+
return data, status_code, headers
|
197
|
+
end
|
198
|
+
# @param flag_id numeric ID of the flag
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @return [Array<Tag>]
|
201
|
+
def find_tags(flag_id, opts = {})
|
202
|
+
data, _status_code, _headers = find_tags_with_http_info(flag_id, opts)
|
203
|
+
data
|
204
|
+
end
|
205
|
+
|
206
|
+
# @param flag_id numeric ID of the flag
|
207
|
+
# @param [Hash] opts the optional parameters
|
208
|
+
# @return [Array<(Array<Tag>, Fixnum, Hash)>] Array<Tag> data, response status code and response headers
|
209
|
+
def find_tags_with_http_info(flag_id, opts = {})
|
210
|
+
if @api_client.config.debugging
|
211
|
+
@api_client.config.logger.debug 'Calling API: TagApi.find_tags ...'
|
212
|
+
end
|
213
|
+
# verify the required parameter 'flag_id' is set
|
214
|
+
if @api_client.config.client_side_validation && flag_id.nil?
|
215
|
+
fail ArgumentError, "Missing the required parameter 'flag_id' when calling TagApi.find_tags"
|
216
|
+
end
|
217
|
+
if @api_client.config.client_side_validation && flag_id < 1
|
218
|
+
fail ArgumentError, 'invalid value for "flag_id" when calling TagApi.find_tags, must be greater than or equal to 1.'
|
219
|
+
end
|
220
|
+
|
221
|
+
# resource path
|
222
|
+
local_var_path = '/flags/{flagID}/tags'.sub('{' + 'flagID' + '}', flag_id.to_s)
|
223
|
+
|
224
|
+
# query parameters
|
225
|
+
query_params = {}
|
226
|
+
|
227
|
+
# header parameters
|
228
|
+
header_params = {}
|
229
|
+
# HTTP header 'Accept' (if needed)
|
230
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
231
|
+
# HTTP header 'Content-Type'
|
232
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
233
|
+
|
234
|
+
# form parameters
|
235
|
+
form_params = {}
|
236
|
+
|
237
|
+
# http body (model)
|
238
|
+
post_body = nil
|
239
|
+
auth_names = []
|
240
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
241
|
+
:header_params => header_params,
|
242
|
+
:query_params => query_params,
|
243
|
+
:form_params => form_params,
|
244
|
+
:body => post_body,
|
245
|
+
:auth_names => auth_names,
|
246
|
+
:return_type => 'Array<Tag>')
|
247
|
+
if @api_client.config.debugging
|
248
|
+
@api_client.config.logger.debug "API called: TagApi#find_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
249
|
+
end
|
250
|
+
return data, status_code, headers
|
251
|
+
end
|
252
|
+
end
|
253
|
+
end
|