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 = {}) ⇒ PackageVersionBadge
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<(PackageVersionBadge, 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 = {}) ⇒ PackageVersionBadge
Get latest package version for a package or package group. Get latest package version for a package or package group.
43 44 45 46 |
# File 'lib/cloudsmith-api/api/badges_api.rb', line 43 def badges_version_list(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) data, _status_code, _headers = badges_version_list_with_http_info(owner, repo, package_format, package_name, package_version, package_identifiers, opts) data end |
#badges_version_list_with_http_info(owner, repo, package_format, package_name, package_version, package_identifiers, opts = {}) ⇒ Array<(PackageVersionBadge, Fixnum, Hash)>
Get latest package version for a package or package group. Get latest package version for a package or package group.
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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/cloudsmith-api/api/badges_api.rb', line 69 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[:'cacheSeconds'] = opts[:'cache_seconds'] if !opts[:'cache_seconds'].nil? query_params[:'color'] = opts[:'color'] if !opts[:'color'].nil? query_params[:'label'] = opts[:'label'] if !opts[:'label'].nil? query_params[:'labelColor'] = opts[:'label_color'] if !opts[:'label_color'].nil? query_params[:'logoColor'] = opts[:'logo_color'] if !opts[:'logo_color'].nil? query_params[:'logoWidth'] = opts[:'logo_width'] if !opts[:'logo_width'].nil? query_params[:'render'] = opts[:'render'] if !opts[:'render'].nil? query_params[:'shields'] = opts[:'shields'] if !opts[:'shields'].nil? query_params[:'show_latest'] = opts[:'show_latest'] if !opts[:'show_latest'].nil? query_params[:'style'] = opts[:'style'] if !opts[:'style'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey', 'basic', 'token'] 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, :return_type => 'PackageVersionBadge') 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 |