Class: LaunchDarklyApi::InsightsPullRequestsBetaApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::InsightsPullRequestsBetaApi
- Defined in:
- lib/launchdarkly_api/api/insights_pull_requests_beta_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_pull_requests(project_key, opts = {}) ⇒ PullRequestCollectionRep
List pull requests Get a list of pull requests ### Expanding the pull request collection response LaunchDarkly supports expanding the pull request collection response to include additional fields.
-
#get_pull_requests_with_http_info(project_key, opts = {}) ⇒ Array<(PullRequestCollectionRep, Integer, Hash)>
List pull requests Get a list of pull requests ### Expanding the pull request collection response LaunchDarkly supports expanding the pull request collection response to include additional fields.
-
#initialize(api_client = ApiClient.default) ⇒ InsightsPullRequestsBetaApi
constructor
A new instance of InsightsPullRequestsBetaApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InsightsPullRequestsBetaApi
Returns a new instance of InsightsPullRequestsBetaApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/insights_pull_requests_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_pull_requests_beta_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_pull_requests(project_key, opts = {}) ⇒ PullRequestCollectionRep
List pull requests
Get a list of pull requests ### Expanding the pull request collection response LaunchDarkly supports expanding the pull request collection response to include additional fields. To expand the response, append the expand query parameter and include the following: * deployments includes details on all of the deployments associated with each pull request * flagReferences includes details on all of the references to flags in each pull request * leadTime includes details about the lead time of the pull request for each stage For example, use ?expand=deployments to include the deployments field in the response. By default, this field is not included in the response.
38 39 40 41 |
# File 'lib/launchdarkly_api/api/insights_pull_requests_beta_api.rb', line 38 def get_pull_requests(project_key, opts = {}) data, _status_code, _headers = get_pull_requests_with_http_info(project_key, opts) data end |
#get_pull_requests_with_http_info(project_key, opts = {}) ⇒ Array<(PullRequestCollectionRep, Integer, Hash)>
List pull requests Get a list of pull requests ### Expanding the pull request collection response LaunchDarkly supports expanding the pull request collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `deployments` includes details on all of the deployments associated with each pull request * `flagReferences` includes details on all of the references to flags in each pull request * `leadTime` includes details about the lead time of the pull request for each stage For example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is not included in the response.
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/launchdarkly_api/api/insights_pull_requests_beta_api.rb', line 59 def get_pull_requests_with_http_info(project_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InsightsPullRequestsBetaApi.get_pull_requests ...' 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 InsightsPullRequestsBetaApi.get_pull_requests" end # resource path local_var_path = '/api/v2/engineering-insights/pull-requests' # query parameters query_params = opts[:query_params] || {} query_params[:'projectKey'] = project_key query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil? query_params[:'applicationKey'] = opts[:'application_key'] if !opts[:'application_key'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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] || 'PullRequestCollectionRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"InsightsPullRequestsBetaApi.get_pull_requests", :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: InsightsPullRequestsBetaApi#get_pull_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |