# cloudsmith-api CloudsmithApi - the Ruby gem for the Cloudsmith API The API to the Cloudsmith Service This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: v1 - Package version: 0.21.4 - Build package: io.swagger.codegen.languages.RubyClientCodegen For more information, please visit [https://help.cloudsmith.io](https://help.cloudsmith.io) ## Installation ### Build a gem To build the Ruby code into a gem: ```shell gem build cloudsmith-api.gemspec ``` Then either install the gem locally: ```shell gem install ./cloudsmith-api-0.21.4.gem ``` (for development, run `gem install --dev ./cloudsmith-api-0.21.4.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: gem 'cloudsmith-api', '~> 0.21.4' ### Install from Git If the Ruby gem is hosted at a git repository: https://github.com/cloudsmith-io/cloudsmith-api, then add the following in the Gemfile: gem 'cloudsmith-api', :git => 'https://github.com/cloudsmith-io/cloudsmith-api.git' ### Include the Ruby code directly Include the Ruby code directly using `-I` as follows: ```shell ruby -Ilib script.rb ``` ## Getting Started Please follow the [installation](#installation) procedure and then run the following code: ```ruby # Load the gem require 'cloudsmith-api' # Setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' # Configure HTTP basic authorization: basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' # Configure API key authorization: csrf_token config.api_key['X-CSRFToken'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-CSRFToken'] = 'Bearer' end api_instance = CloudsmithApi::DistrosApi.new begin #Get a list of all supported distributions. result = api_instance.distros_list p result rescue CloudsmithApi::ApiError => e puts "Exception when calling DistrosApi->distros_list: #{e}" end ``` ## Documentation for API Endpoints All URIs are relative to *https://api-prd.cloudsmith.io/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *CloudsmithApi::DistrosApi* | [**distros_list**](docs/DistrosApi.md#distros_list) | **GET** /distros/ | Get a list of all supported distributions. *CloudsmithApi::DistrosApi* | [**distros_read**](docs/DistrosApi.md#distros_read) | **GET** /distros/{slug}/ | View for viewing/listing package formats. *CloudsmithApi::FilesApi* | [**files_create**](docs/FilesApi.md#files_create) | **POST** /files/{owner}/{repo}/ | Request URL(s) to POST new package file upload(s) to. *CloudsmithApi::FilesApi* | [**files_validate**](docs/FilesApi.md#files_validate) | **POST** /files/{owner}/{repo}/validate/ | Validate parameters used for create. *CloudsmithApi::FormatsApi* | [**formats_list**](docs/FormatsApi.md#formats_list) | **GET** /formats/ | Get a list of all supported package formats. *CloudsmithApi::FormatsApi* | [**formats_read**](docs/FormatsApi.md#formats_read) | **GET** /formats/{slug}/ | Get a specific supported package format. *CloudsmithApi::NamespacesApi* | [**namespaces_list**](docs/NamespacesApi.md#namespaces_list) | **GET** /namespaces/ | Get a list of all namespaces the user belongs to. *CloudsmithApi::NamespacesApi* | [**namespaces_read**](docs/NamespacesApi.md#namespaces_read) | **GET** /namespaces/{slug}/ | Views for working with namespaces. *CloudsmithApi::OrgsApi* | [**orgs_list**](docs/OrgsApi.md#orgs_list) | **GET** /orgs/ | Get a list of all the organizations you are associated with. *CloudsmithApi::OrgsApi* | [**orgs_read**](docs/OrgsApi.md#orgs_read) | **GET** /orgs/{slug}/ | Views for working with organizations. *CloudsmithApi::PackagesApi* | [**packages_delete**](docs/PackagesApi.md#packages_delete) | **DELETE** /packages/{owner}/{repo}/{slug}/ | Delete a specific package in a repository. *CloudsmithApi::PackagesApi* | [**packages_list**](docs/PackagesApi.md#packages_list) | **GET** /packages/{owner}/{repo}/ | Views for working with repository packages. *CloudsmithApi::PackagesApi* | [**packages_read**](docs/PackagesApi.md#packages_read) | **GET** /packages/{owner}/{repo}/{slug}/ | Get a specific package in a repository. *CloudsmithApi::PackagesApi* | [**packages_status**](docs/PackagesApi.md#packages_status) | **GET** /packages/{owner}/{repo}/{slug}/status/ | Get the synchronisation status for a package. *CloudsmithApi::PackagesApi* | [**packages_upload_deb**](docs/PackagesApi.md#packages_upload_deb) | **POST** /packages/{owner}/{repo}/upload/deb/ | Create a new Debian package *CloudsmithApi::PackagesApi* | [**packages_upload_maven**](docs/PackagesApi.md#packages_upload_maven) | **POST** /packages/{owner}/{repo}/upload/maven/ | Create a new Maven package *CloudsmithApi::PackagesApi* | [**packages_upload_python**](docs/PackagesApi.md#packages_upload_python) | **POST** /packages/{owner}/{repo}/upload/python/ | Create a new Python package *CloudsmithApi::PackagesApi* | [**packages_upload_raw**](docs/PackagesApi.md#packages_upload_raw) | **POST** /packages/{owner}/{repo}/upload/raw/ | Create a new Raw package *CloudsmithApi::PackagesApi* | [**packages_upload_rpm**](docs/PackagesApi.md#packages_upload_rpm) | **POST** /packages/{owner}/{repo}/upload/rpm/ | Create a new RedHat package *CloudsmithApi::PackagesApi* | [**packages_upload_ruby**](docs/PackagesApi.md#packages_upload_ruby) | **POST** /packages/{owner}/{repo}/upload/ruby/ | Create a new Ruby package *CloudsmithApi::PackagesApi* | [**packages_upload_vagrant**](docs/PackagesApi.md#packages_upload_vagrant) | **POST** /packages/{owner}/{repo}/upload/vagrant/ | Create a new Vagrant package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_deb**](docs/PackagesApi.md#packages_validate_upload_deb) | **POST** /packages/{owner}/{repo}/validate-upload/deb/ | Validate parameters for create Debian package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_maven**](docs/PackagesApi.md#packages_validate_upload_maven) | **POST** /packages/{owner}/{repo}/validate-upload/maven/ | Validate parameters for create Maven package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_python**](docs/PackagesApi.md#packages_validate_upload_python) | **POST** /packages/{owner}/{repo}/validate-upload/python/ | Validate parameters for create Python package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_raw**](docs/PackagesApi.md#packages_validate_upload_raw) | **POST** /packages/{owner}/{repo}/validate-upload/raw/ | Validate parameters for create Raw package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_rpm**](docs/PackagesApi.md#packages_validate_upload_rpm) | **POST** /packages/{owner}/{repo}/validate-upload/rpm/ | Validate parameters for create RedHat package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_ruby**](docs/PackagesApi.md#packages_validate_upload_ruby) | **POST** /packages/{owner}/{repo}/validate-upload/ruby/ | Validate parameters for create Ruby package *CloudsmithApi::PackagesApi* | [**packages_validate_upload_vagrant**](docs/PackagesApi.md#packages_validate_upload_vagrant) | **POST** /packages/{owner}/{repo}/validate-upload/vagrant/ | Validate parameters for create Vagrant package *CloudsmithApi::ReposApi* | [**repos_list**](docs/ReposApi.md#repos_list) | **GET** /repos/{owner}/ | Get a list of all repositories within a namespace. *CloudsmithApi::ReposApi* | [**repos_read**](docs/ReposApi.md#repos_read) | **GET** /repos/{owner}/{slug}/ | Views for working with repositories. *CloudsmithApi::StatusApi* | [**status_check_basic**](docs/StatusApi.md#status_check_basic) | **GET** /status/check/basic/ | Endpoint to check basic API connectivity. *CloudsmithApi::UserApi* | [**user_self**](docs/UserApi.md#user_self) | **GET** /user/self/ | Provide a brief for the current user (if any). *CloudsmithApi::UserApi* | [**user_token_create**](docs/UserApi.md#user_token_create) | **POST** /user/token/ | Retrieve the API key/token for the authenticated user. *CloudsmithApi::UsersApi* | [**users_profile_read**](docs/UsersApi.md#users_profile_read) | **GET** /users/profile/{slug}/ | Provide a brief for the specified user (if any). ## Documentation for Models - [CloudsmithApi::Distribution](docs/Distribution.md) - [CloudsmithApi::DistributionVersions](docs/DistributionVersions.md) - [CloudsmithApi::FilesCreate](docs/FilesCreate.md) - [CloudsmithApi::FilesValidate](docs/FilesValidate.md) - [CloudsmithApi::Format](docs/Format.md) - [CloudsmithApi::FormatDistributions](docs/FormatDistributions.md) - [CloudsmithApi::MavenPackageUpload](docs/MavenPackageUpload.md) - [CloudsmithApi::Namespace](docs/Namespace.md) - [CloudsmithApi::Organization](docs/Organization.md) - [CloudsmithApi::PackageFileUpload](docs/PackageFileUpload.md) - [CloudsmithApi::PackageStatus](docs/PackageStatus.md) - [CloudsmithApi::PackagesUploadDeb](docs/PackagesUploadDeb.md) - [CloudsmithApi::PackagesUploadMaven](docs/PackagesUploadMaven.md) - [CloudsmithApi::PackagesUploadPython](docs/PackagesUploadPython.md) - [CloudsmithApi::PackagesUploadRaw](docs/PackagesUploadRaw.md) - [CloudsmithApi::PackagesUploadRpm](docs/PackagesUploadRpm.md) - [CloudsmithApi::PackagesUploadRuby](docs/PackagesUploadRuby.md) - [CloudsmithApi::PackagesUploadVagrant](docs/PackagesUploadVagrant.md) - [CloudsmithApi::PackagesValidateuploadDeb](docs/PackagesValidateuploadDeb.md) - [CloudsmithApi::PackagesValidateuploadMaven](docs/PackagesValidateuploadMaven.md) - [CloudsmithApi::PackagesValidateuploadPython](docs/PackagesValidateuploadPython.md) - [CloudsmithApi::PackagesValidateuploadRaw](docs/PackagesValidateuploadRaw.md) - [CloudsmithApi::PackagesValidateuploadRpm](docs/PackagesValidateuploadRpm.md) - [CloudsmithApi::PackagesValidateuploadRuby](docs/PackagesValidateuploadRuby.md) - [CloudsmithApi::PackagesValidateuploadVagrant](docs/PackagesValidateuploadVagrant.md) - [CloudsmithApi::Repository](docs/Repository.md) - [CloudsmithApi::RpmPackageUpload](docs/RpmPackageUpload.md) - [CloudsmithApi::RpmPackageUploadArchitectures](docs/RpmPackageUploadArchitectures.md) - [CloudsmithApi::RpmPackageUploadFiles](docs/RpmPackageUploadFiles.md) - [CloudsmithApi::Status](docs/Status.md) - [CloudsmithApi::StatusBasic](docs/StatusBasic.md) - [CloudsmithApi::UserAuthToken](docs/UserAuthToken.md) - [CloudsmithApi::UserBrief](docs/UserBrief.md) - [CloudsmithApi::UserProfile](docs/UserProfile.md) - [CloudsmithApi::UserTokenCreate](docs/UserTokenCreate.md) - [CloudsmithApi::VagrantPackageUpload](docs/VagrantPackageUpload.md) ## Documentation for Authorization ### apikey - **Type**: API key - **API key parameter name**: X-Api-Key - **Location**: HTTP header ### basic - **Type**: HTTP basic authentication ### csrf_token - **Type**: API key - **API key parameter name**: X-CSRFToken - **Location**: HTTP header