Class: LaunchDarklyApi::FlagLinksBetaApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::FlagLinksBetaApi
- Defined in:
- lib/launchdarkly_api/api/flag_links_beta_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_flag_link(project_key, feature_flag_key, flag_link_post, opts = {}) ⇒ FlagLinkRep
Create flag link Create a new flag link.
-
#create_flag_link_with_http_info(project_key, feature_flag_key, flag_link_post, opts = {}) ⇒ Array<(FlagLinkRep, Integer, Hash)>
Create flag link Create a new flag link.
-
#delete_flag_link(project_key, feature_flag_key, id, opts = {}) ⇒ nil
Delete flag link Delete a flag link by ID or key.
-
#delete_flag_link_with_http_info(project_key, feature_flag_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete flag link Delete a flag link by ID or key.
-
#get_flag_links(project_key, feature_flag_key, opts = {}) ⇒ FlagLinkCollectionRep
List flag links Get a list of all flag links.
-
#get_flag_links_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(FlagLinkCollectionRep, Integer, Hash)>
List flag links Get a list of all flag links.
-
#initialize(api_client = ApiClient.default) ⇒ FlagLinksBetaApi
constructor
A new instance of FlagLinksBetaApi.
-
#update_flag_link(project_key, feature_flag_key, id, patch_operation, opts = {}) ⇒ FlagLinkRep
Update flag link Update a flag link.
-
#update_flag_link_with_http_info(project_key, feature_flag_key, id, patch_operation, opts = {}) ⇒ Array<(FlagLinkRep, Integer, Hash)>
Update flag link Update a flag link.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FlagLinksBetaApi
Returns a new instance of FlagLinksBetaApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_flag_link(project_key, feature_flag_key, flag_link_post, opts = {}) ⇒ FlagLinkRep
Create flag link Create a new flag link. Flag links let you reference external resources and associate them with your flags.
29 30 31 32 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 29 def create_flag_link(project_key, feature_flag_key, flag_link_post, opts = {}) data, _status_code, _headers = create_flag_link_with_http_info(project_key, feature_flag_key, flag_link_post, opts) data end |
#create_flag_link_with_http_info(project_key, feature_flag_key, flag_link_post, opts = {}) ⇒ Array<(FlagLinkRep, Integer, Hash)>
Create flag link Create a new flag link. Flag links let you reference external resources and associate them with your flags.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 41 def create_flag_link_with_http_info(project_key, feature_flag_key, flag_link_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FlagLinksBetaApi.create_flag_link ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagLinksBetaApi.create_flag_link" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FlagLinksBetaApi.create_flag_link" end # verify the required parameter 'flag_link_post' is set if @api_client.config.client_side_validation && flag_link_post.nil? fail ArgumentError, "Missing the required parameter 'flag_link_post' when calling FlagLinksBetaApi.create_flag_link" end # resource path local_var_path = '/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(flag_link_post) # return_type return_type = opts[:debug_return_type] || 'FlagLinkRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FlagLinksBetaApi.create_flag_link", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FlagLinksBetaApi#create_flag_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_flag_link(project_key, feature_flag_key, id, opts = {}) ⇒ nil
Delete flag link Delete a flag link by ID or key.
109 110 111 112 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 109 def delete_flag_link(project_key, feature_flag_key, id, opts = {}) delete_flag_link_with_http_info(project_key, feature_flag_key, id, opts) nil end |
#delete_flag_link_with_http_info(project_key, feature_flag_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete flag link Delete a flag link by ID or key.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 121 def delete_flag_link_with_http_info(project_key, feature_flag_key, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FlagLinksBetaApi.delete_flag_link ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagLinksBetaApi.delete_flag_link" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FlagLinksBetaApi.delete_flag_link" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling FlagLinksBetaApi.delete_flag_link" end # resource path local_var_path = '/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FlagLinksBetaApi.delete_flag_link", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FlagLinksBetaApi#delete_flag_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_flag_links(project_key, feature_flag_key, opts = {}) ⇒ FlagLinkCollectionRep
List flag links Get a list of all flag links.
183 184 185 186 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 183 def get_flag_links(project_key, feature_flag_key, opts = {}) data, _status_code, _headers = get_flag_links_with_http_info(project_key, feature_flag_key, opts) data end |
#get_flag_links_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(FlagLinkCollectionRep, Integer, Hash)>
List flag links Get a list of all flag links.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 194 def get_flag_links_with_http_info(project_key, feature_flag_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FlagLinksBetaApi.get_flag_links ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagLinksBetaApi.get_flag_links" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FlagLinksBetaApi.get_flag_links" end # resource path local_var_path = '/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FlagLinkCollectionRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FlagLinksBetaApi.get_flag_links", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FlagLinksBetaApi#get_flag_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_flag_link(project_key, feature_flag_key, id, patch_operation, opts = {}) ⇒ FlagLinkRep
Update flag link Update a flag link. The request body must be a valid JSON patch document. To learn more, read [Updates](/#section/Overview/Updates).
254 255 256 257 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 254 def update_flag_link(project_key, feature_flag_key, id, patch_operation, opts = {}) data, _status_code, _headers = update_flag_link_with_http_info(project_key, feature_flag_key, id, patch_operation, opts) data end |
#update_flag_link_with_http_info(project_key, feature_flag_key, id, patch_operation, opts = {}) ⇒ Array<(FlagLinkRep, Integer, Hash)>
Update flag link Update a flag link. The request body must be a valid JSON patch document. To learn more, read [Updates](/#section/Overview/Updates).
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'lib/launchdarkly_api/api/flag_links_beta_api.rb', line 267 def update_flag_link_with_http_info(project_key, feature_flag_key, id, patch_operation, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FlagLinksBetaApi.update_flag_link ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagLinksBetaApi.update_flag_link" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FlagLinksBetaApi.update_flag_link" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling FlagLinksBetaApi.update_flag_link" end # verify the required parameter 'patch_operation' is set if @api_client.config.client_side_validation && patch_operation.nil? fail ArgumentError, "Missing the required parameter 'patch_operation' when calling FlagLinksBetaApi.update_flag_link" end # resource path local_var_path = '/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_operation) # return_type return_type = opts[:debug_return_type] || 'FlagLinkRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FlagLinksBetaApi.update_flag_link", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FlagLinksBetaApi#update_flag_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |