Class: LaunchDarklyApi::WorkflowsBetaApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::WorkflowsBetaApi
- Defined in:
- lib/launchdarkly_api/api/workflows_beta_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_workflow(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ nil
Delete workflow Delete a workflow from a feature flag.
-
#delete_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete workflow Delete a workflow from a feature flag.
-
#get_custom_workflow(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ CustomWorkflowOutputRep
Get custom workflow Get a specific workflow by ID.
-
#get_custom_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ Array<(CustomWorkflowOutputRep, Integer, Hash)>
Get custom workflow Get a specific workflow by ID.
-
#get_workflows(project_key, feature_flag_key, environment_key, opts = {}) ⇒ CustomWorkflowsListingOutputRep
Get workflows Get workflows from a feature flag.
-
#get_workflows_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(CustomWorkflowsListingOutputRep, Integer, Hash)>
Get workflows Get workflows from a feature flag.
-
#initialize(api_client = ApiClient.default) ⇒ WorkflowsBetaApi
constructor
A new instance of WorkflowsBetaApi.
-
#post_workflow(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts = {}) ⇒ CustomWorkflowOutputRep
Create workflow Create a workflow for a feature flag.
-
#post_workflow_with_http_info(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts = {}) ⇒ Array<(CustomWorkflowOutputRep, Integer, Hash)>
Create workflow Create a workflow for a feature flag.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WorkflowsBetaApi
Returns a new instance of WorkflowsBetaApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/workflows_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/workflows_beta_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_workflow(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ nil
Delete workflow Delete a workflow from a feature flag
30 31 32 33 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 30 def delete_workflow(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) delete_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts) nil end |
#delete_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete workflow Delete a workflow from a feature flag
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 101 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 43 def delete_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkflowsBetaApi.delete_workflow ...' 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 WorkflowsBetaApi.delete_workflow" 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 WorkflowsBetaApi.delete_workflow" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling WorkflowsBetaApi.delete_workflow" end # verify the required parameter 'workflow_id' is set if @api_client.config.client_side_validation && workflow_id.nil? fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkflowsBetaApi.delete_workflow" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_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 => :"WorkflowsBetaApi.delete_workflow", :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: WorkflowsBetaApi#delete_workflow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_custom_workflow(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ CustomWorkflowOutputRep
Get custom workflow Get a specific workflow by ID
111 112 113 114 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 111 def get_custom_workflow(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) data, _status_code, _headers = get_custom_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts) data end |
#get_custom_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) ⇒ Array<(CustomWorkflowOutputRep, Integer, Hash)>
Get custom workflow Get a specific workflow by ID
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 176 177 178 179 180 181 182 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 124 def get_custom_workflow_with_http_info(project_key, feature_flag_key, environment_key, workflow_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkflowsBetaApi.get_custom_workflow ...' 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 WorkflowsBetaApi.get_custom_workflow" 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 WorkflowsBetaApi.get_custom_workflow" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling WorkflowsBetaApi.get_custom_workflow" end # verify the required parameter 'workflow_id' is set if @api_client.config.client_side_validation && workflow_id.nil? fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkflowsBetaApi.get_custom_workflow" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_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] || 'CustomWorkflowOutputRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"WorkflowsBetaApi.get_custom_workflow", :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: WorkflowsBetaApi#get_custom_workflow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workflows(project_key, feature_flag_key, environment_key, opts = {}) ⇒ CustomWorkflowsListingOutputRep
Get workflows Get workflows from a feature flag
191 192 193 194 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 191 def get_workflows(project_key, feature_flag_key, environment_key, opts = {}) data, _status_code, _headers = get_workflows_with_http_info(project_key, feature_flag_key, environment_key, opts) data end |
#get_workflows_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(CustomWorkflowsListingOutputRep, Integer, Hash)>
Get workflows Get workflows from a feature flag
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 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 203 def get_workflows_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkflowsBetaApi.get_workflows ...' 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 WorkflowsBetaApi.get_workflows" 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 WorkflowsBetaApi.get_workflows" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling WorkflowsBetaApi.get_workflows" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_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] || 'CustomWorkflowsListingOutputRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"WorkflowsBetaApi.get_workflows", :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: WorkflowsBetaApi#get_workflows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_workflow(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts = {}) ⇒ CustomWorkflowOutputRep
Create workflow Create a workflow for a feature flag
267 268 269 270 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 267 def post_workflow(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts = {}) data, _status_code, _headers = post_workflow_with_http_info(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts) data end |
#post_workflow_with_http_info(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts = {}) ⇒ Array<(CustomWorkflowOutputRep, Integer, Hash)>
Create workflow Create a workflow for a feature flag
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 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/launchdarkly_api/api/workflows_beta_api.rb', line 280 def post_workflow_with_http_info(project_key, feature_flag_key, environment_key, custom_workflow_input_rep, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WorkflowsBetaApi.post_workflow ...' 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 WorkflowsBetaApi.post_workflow" 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 WorkflowsBetaApi.post_workflow" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling WorkflowsBetaApi.post_workflow" end # verify the required parameter 'custom_workflow_input_rep' is set if @api_client.config.client_side_validation && custom_workflow_input_rep.nil? fail ArgumentError, "Missing the required parameter 'custom_workflow_input_rep' when calling WorkflowsBetaApi.post_workflow" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_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(custom_workflow_input_rep) # return_type return_type = opts[:debug_return_type] || 'CustomWorkflowOutputRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"WorkflowsBetaApi.post_workflow", :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: WorkflowsBetaApi#post_workflow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |