Class: CloudsmithApi::BadgesApi
- Inherits:
-
Object
- Object
- CloudsmithApi::BadgesApi
- Defined in:
- lib/cloudsmith-api/api/badges_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#badges_version_list(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) ⇒ nil
Get latest package version for a package or package group.
-
#badges_version_list_with_http_info(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get latest package version for a package or package group.
-
#initialize(api_client = ApiClient.default) ⇒ BadgesApi
constructor
A new instance of BadgesApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudsmith-api/api/badges_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#badges_version_list(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) ⇒ nil
Get latest package version for a package or package group. Get latest package version for a package or package group.
35 36 37 38 |
# File 'lib/cloudsmith-api/api/badges_api.rb', line 35 def badges_version_list(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) badges_version_list_with_http_info(owner, repo, package_format, package_name, package_version, package_identifiers, opts) return nil end |
#badges_version_list_with_http_info(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get latest package version for a package or package group. Get latest package version for a package or package group.
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 102 103 104 105 106 107 |
# File 'lib/cloudsmith-api/api/badges_api.rb', line 52 def badges_version_list_with_http_info(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BadgesApi.badges_version_list ..." end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? fail ArgumentError, "Missing the required parameter 'owner' when calling BadgesApi.badges_version_list" end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling BadgesApi.badges_version_list" end # verify the required parameter 'package_format' is set if @api_client.config.client_side_validation && package_format.nil? fail ArgumentError, "Missing the required parameter 'package_format' when calling BadgesApi.badges_version_list" end # verify the required parameter 'package_name' is set if @api_client.config.client_side_validation && package_name.nil? fail ArgumentError, "Missing the required parameter 'package_name' when calling BadgesApi.badges_version_list" end # verify the required parameter 'package_version' is set if @api_client.config.client_side_validation && package_version.nil? fail ArgumentError, "Missing the required parameter 'package_version' when calling BadgesApi.badges_version_list" end # verify the required parameter 'package_identifiers' is set if @api_client.config.client_side_validation && package_identifiers.nil? fail ArgumentError, "Missing the required parameter 'package_identifiers' when calling BadgesApi.badges_version_list" end # resource path local_var_path = "/badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'package_format' + '}', package_format.to_s).sub('{' + 'package_name' + '}', package_name.to_s).sub('{' + 'package_version' + '}', package_version.to_s).sub('{' + 'package_identifiers' + '}', package_identifiers.to_s) # query parameters query_params = {} query_params[:'badge_token'] = opts[:'badge_token'] if !opts[:'badge_token'].nil? query_params[:'render'] = opts[:'render'] if !opts[:'render'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: BadgesApi#badges_version_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |