Skip to content

buildio/sdk-ruby

Repository files navigation

build_client

BuildClient - the Ruby gem for the Build.io API V1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.1.8
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build build_client.gemspec

Then either install the gem locally:

gem install ./build_client-1.1.8.gem

(for development, run gem install --dev ./build_client-1.1.8.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'build_client', '~> 1.1.8'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/buildio/sdk-ruby, then add the following in the Gemfile:

gem 'build_client', :git => 'https://github.com/buildio/sdk-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'build_client'

# Setup authorization
BuildClient.configure do |config|
  # Configure Bearer authorization: bearer
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = BuildClient::DefaultApi.new
id = 'id_example' # String | Environment ID

begin
  #get environment config-vars (e.g. pipeline RA env)
  result = api_instance.api_v1_environments_id_get(id)
  p result
rescue BuildClient::ApiError => e
  puts "Exception when calling DefaultApi->api_v1_environments_id_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://app.build.io

Class Method HTTP request Description
BuildClient::DefaultApi api_v1_environments_id_get GET /api/v1/environments/{id} get environment config-vars (e.g. pipeline RA env)
BuildClient::DefaultApi api_v1_environments_id_key_delete DELETE /api/v1/environments/{id}/{key} delete environment config-var
BuildClient::DefaultApi api_v1_environments_id_patch PATCH /api/v1/environments/{id} set or update environment config-vars (e.g. pipeline RA env)
BuildClient::DefaultApi app GET /api/v1/apps/{app_id_or_name} show app
BuildClient::DefaultApi apps GET /api/v1/apps list apps
BuildClient::DefaultApi config_vars GET /api/v1/apps/{app_id_or_name}/config-vars list all config-vars
BuildClient::DefaultApi create_app POST /api/v1/apps create app
BuildClient::DefaultApi create_build POST /api/v1/apps/{app_id_or_name}/builds create build
BuildClient::DefaultApi create_namespace POST /api/v1/namespaces create a namespace
BuildClient::DefaultApi delete_config_var DELETE /api/v1/apps/{app_id_or_name}/config-vars/{key} delete config-var
BuildClient::DefaultApi delete_namespace DELETE /api/v1/namespaces/{namespace_id_or_name} delete a namespace
BuildClient::DefaultApi exec_dyno POST /api/v1/apps/{app_id_or_name}/dynos/{dyno}/exec exec into dyno
BuildClient::DefaultApi list_dynos GET /api/v1/apps/{app_id_or_name}/dynos/list list dynos
BuildClient::DefaultApi me GET /api/v1/me identity
BuildClient::DefaultApi namespace GET /api/v1/namespaces/{namespace_id_or_name} show namespace
BuildClient::DefaultApi namespaces GET /api/v1/namespaces list all namespaces
BuildClient::DefaultApi oidc_login GET /api/v1/oidc-login kubernetes oidc-login
BuildClient::DefaultApi restart_all_dynos DELETE /api/v1/apps/{app_id_or_name}/dynos restart all dynos
BuildClient::DefaultApi restart_dynos DELETE /api/v1/apps/{app_id_or_name}/dynos/{dyno} restart specific dyno
BuildClient::DefaultApi set_config_vars PATCH /api/v1/apps/{app_id_or_name}/config-vars set or update config-vars
BuildClient::DefaultApi team GET /api/v1/teams/{id} show team
BuildClient::DefaultApi teams GET /api/v1/teams list all teams
BuildClient::PipelinesApi get_pipeline GET /api/v1/pipelines/{pipeline_id_or_name} get a specific pipeline
BuildClient::PipelinesApi list_pipeline_apps GET /api/v1/pipelines/{pipeline_id_or_name}/apps list apps in a pipeline
BuildClient::PipelinesApi list_pipelines GET /api/v1/pipelines list pipelines

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearer

  • Type: Bearer authentication

api_key

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

oauth2

open_id_connect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published