=begin This is an automatically generated file. DO NOT EDIT. Generated from version 2.1.85 of the OpenAPI specification at https://github.com/athenianco/api-spec/releases/tag/2.1.85. Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.5.0 =end require 'cgi' module Athenian class GetApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # List all the contributors belonging to the specified account. # @param id [Integer] Numeric identifier of the account. # @param [Hash] opts the optional parameters # @return [Array] def get_contributors(id, opts = {}) data, _status_code, _headers = get_contributors_with_http_info(id, opts) data end # List all the contributors belonging to the specified account. # @param id [Integer] Numeric identifier of the account. # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def get_contributors_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GetApi.get_contributors ...' 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 GetApi.get_contributors" end # resource path local_var_path = '/get/contributors/{id}'.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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"GetApi.get_contributors", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: GetApi#get_contributors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve Jira issues by key. # @param [Hash] opts the optional parameters # @option opts [GetJIRAIssuesRequest] :get_jira_issues_request # @return [GetJIRAIssuesResponse] def get_jira_issues(opts = {}) data, _status_code, _headers = get_jira_issues_with_http_info(opts) data end # Retrieve Jira issues by key. # @param [Hash] opts the optional parameters # @option opts [GetJIRAIssuesRequest] :get_jira_issues_request # @return [Array<(GetJIRAIssuesResponse, Integer, Hash)>] GetJIRAIssuesResponse data, response status code and response headers def get_jira_issues_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GetApi.get_jira_issues ...' end # resource path local_var_path = '/get/jira_issues' # 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(opts[:'get_jira_issues_request']) # return_type return_type = opts[:debug_return_type] || 'GetJIRAIssuesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"GetApi.get_jira_issues", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: GetApi#get_jira_issues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List pull requests by repository and number. # @param [Hash] opts the optional parameters # @option opts [GetPullRequestsRequest] :get_pull_requests_request # @return [PullRequestSet] def get_prs(opts = {}) data, _status_code, _headers = get_prs_with_http_info(opts) data end # List pull requests by repository and number. # @param [Hash] opts the optional parameters # @option opts [GetPullRequestsRequest] :get_pull_requests_request # @return [Array<(PullRequestSet, Integer, Hash)>] PullRequestSet data, response status code and response headers def get_prs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GetApi.get_prs ...' end # resource path local_var_path = '/get/pull_requests' # 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(opts[:'get_pull_requests_request']) # return_type return_type = opts[:debug_return_type] || 'PullRequestSet' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"GetApi.get_prs", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: GetApi#get_prs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List releases by repository and name. # @param [Hash] opts the optional parameters # @option opts [GetReleasesRequest] :get_releases_request # @return [ReleaseSet] def get_releases(opts = {}) data, _status_code, _headers = get_releases_with_http_info(opts) data end # List releases by repository and name. # @param [Hash] opts the optional parameters # @option opts [GetReleasesRequest] :get_releases_request # @return [Array<(ReleaseSet, Integer, Hash)>] ReleaseSet data, response status code and response headers def get_releases_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GetApi.get_releases ...' end # resource path local_var_path = '/get/releases' # 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(opts[:'get_releases_request']) # return_type return_type = opts[:debug_return_type] || 'ReleaseSet' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"GetApi.get_releases", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: GetApi#get_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end