Class: LaunchDarklyApi::InsightsFlagEventsBetaApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::InsightsFlagEventsBetaApi
- Defined in:
- lib/launchdarkly_api/api/insights_flag_events_beta_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_flag_events(project_key, environment_key, opts = {}) ⇒ FlagEventCollectionRep
List flag events Get a list of flag events ### Expanding the flag event collection response LaunchDarkly supports expanding the flag event collection response to include additional fields.
-
#get_flag_events_with_http_info(project_key, environment_key, opts = {}) ⇒ Array<(FlagEventCollectionRep, Integer, Hash)>
List flag events Get a list of flag events ### Expanding the flag event collection response LaunchDarkly supports expanding the flag event collection response to include additional fields.
-
#initialize(api_client = ApiClient.default) ⇒ InsightsFlagEventsBetaApi
constructor
A new instance of InsightsFlagEventsBetaApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InsightsFlagEventsBetaApi
Returns a new instance of InsightsFlagEventsBetaApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/insights_flag_events_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/insights_flag_events_beta_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_flag_events(project_key, environment_key, opts = {}) ⇒ FlagEventCollectionRep
List flag events
Get a list of flag events ### Expanding the flag event collection response LaunchDarkly supports expanding the flag event collection response to include additional fields. To expand the response, append the expand query parameter and include the following: * experiments includes details on all of the experiments run on each flag For example, use ?expand=experiments to include the experiments field in the response. By default, this field is not included in the response.
39 40 41 42 |
# File 'lib/launchdarkly_api/api/insights_flag_events_beta_api.rb', line 39 def get_flag_events(project_key, environment_key, opts = {}) data, _status_code, _headers = get_flag_events_with_http_info(project_key, environment_key, opts) data end |
#get_flag_events_with_http_info(project_key, environment_key, opts = {}) ⇒ Array<(FlagEventCollectionRep, Integer, Hash)>
List flag events Get a list of flag events ### Expanding the flag event collection response LaunchDarkly supports expanding the flag event collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `experiments` includes details on all of the experiments run on each flag For example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is not included in the response.
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/launchdarkly_api/api/insights_flag_events_beta_api.rb', line 61 def get_flag_events_with_http_info(project_key, environment_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InsightsFlagEventsBetaApi.get_flag_events ...' 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 InsightsFlagEventsBetaApi.get_flag_events" 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 InsightsFlagEventsBetaApi.get_flag_events" end # resource path local_var_path = '/api/v2/engineering-insights/flag-events' # query parameters query_params = opts[:query_params] || {} query_params[:'projectKey'] = project_key query_params[:'environmentKey'] = environment_key query_params[:'applicationKey'] = opts[:'application_key'] if !opts[:'application_key'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'impactSize'] = opts[:'impact_size'] if !opts[:'impact_size'].nil? query_params[:'hasExperiments'] = opts[:'has_experiments'] if !opts[:'has_experiments'].nil? query_params[:'global'] = opts[:'global'] if !opts[:'global'].nil? query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FlagEventCollectionRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"InsightsFlagEventsBetaApi.get_flag_events", :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: InsightsFlagEventsBetaApi#get_flag_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |