Skip to content

buildio/sdk-node

Repository files navigation

build_io_api_v1

BuildIoApiV1 - JavaScript client for 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: v1
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install build_io_api_v1 --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your build_io_api_v1 from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var BuildIoApiV1 = require('build_io_api_v1');

var defaultClient = BuildIoApiV1.ApiClient.instance;
// Configure Bearer access token for authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.accessToken = "YOUR ACCESS TOKEN"
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new BuildIoApiV1.DefaultApi()
var id = "id_example"; // {String} app id or name
var opts = {
  'apiV1AppsIdBuildsPostRequest': new BuildIoApiV1.ApiV1AppsIdBuildsPostRequest() // {ApiV1AppsIdBuildsPostRequest} 
};
api.apiV1AppsIdBuildsPost(id, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

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

Class Method HTTP request Description
BuildIoApiV1.DefaultApi apiV1AppsIdBuildsPost POST /api/v1/apps/{id}/builds create build
BuildIoApiV1.DefaultApi apiV1MeGet GET /api/v1/me identity
BuildIoApiV1.DefaultApi apiV1OidcLoginGet GET /api/v1/oidc-login kubernetes oidc-login
BuildIoApiV1.DefaultApi app GET /api/v1/apps/{id} show app
BuildIoApiV1.DefaultApi apps GET /api/v1/apps list apps
BuildIoApiV1.DefaultApi configVars GET /api/v1/apps/{app_id_or_name}/config-vars list all config-vars
BuildIoApiV1.DefaultApi createApp POST /api/v1/apps create app
BuildIoApiV1.DefaultApi createNamespace POST /api/v1/namespaces create a namespace
BuildIoApiV1.DefaultApi deleteConfigVar DELETE /api/v1/apps/{app_id_or_name}/config-vars/{key} delete config-var
BuildIoApiV1.DefaultApi deleteNamespace DELETE /api/v1/namespaces/{namespace_id_or_name} delete a namespace
BuildIoApiV1.DefaultApi listDynos GET /api/v1/apps/{id}/dynos/list list dynos
BuildIoApiV1.DefaultApi namespace GET /api/v1/namespaces/{namespace_id_or_name} show namespace
BuildIoApiV1.DefaultApi namespaces GET /api/v1/namespaces list all namespaces
BuildIoApiV1.DefaultApi restartAllDynos DELETE /api/v1/apps/{id}/dynos restart all dynos
BuildIoApiV1.DefaultApi restartDynos DELETE /api/v1/apps/{id}/dynos/{dyno} restart specific dynos
BuildIoApiV1.DefaultApi setConfigVars PATCH /api/v1/apps/{app_id_or_name}/config-vars set or update config-vars
BuildIoApiV1.DefaultApi team GET /api/v1/teams/{id} show team
BuildIoApiV1.DefaultApi teams GET /api/v1/teams list all teams

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

Contributors 3

  •  
  •  
  •