swaggy-jenkins

3.0.1 • Public • Published

swaggy-jenkins

SwaggyJenkins - JavaScript client for swaggy-jenkins Jenkins API clients generated from Swagger / Open API specification This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.1
  • Package version: 3.0.1
  • Generator version: 7.4.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://github.com/oapicf/swaggy-jenkins

Installation

For Node.js

npm

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

Then install it via:

npm install swaggy-jenkins --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 swaggy-jenkins 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/oapicf/swaggy-jenkins then install it via:

    npm install oapicf/swaggy-jenkins --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 SwaggyJenkins = require('swaggy-jenkins');

var defaultClient = SwaggyJenkins.ApiClient.instance;
// Configure HTTP basic authorization: jenkins_auth
var jenkins_auth = defaultClient.authentications['jenkins_auth'];
jenkins_auth.username = 'YOUR USERNAME'
jenkins_auth.password = 'YOUR PASSWORD'

var api = new SwaggyJenkins.BaseApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCrumb(callback);

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
SwaggyJenkins.BaseApi getCrumb GET /crumbIssuer/api/json
SwaggyJenkins.BlueOceanApi deletePipelineQueueItem DELETE /blue/rest/organizations/{organization}/pipelines/{pipeline}/queue/{queue}
SwaggyJenkins.BlueOceanApi getAuthenticatedUser GET /blue/rest/organizations/{organization}/user/
SwaggyJenkins.BlueOceanApi getClasses GET /blue/rest/classes/{class}
SwaggyJenkins.BlueOceanApi getJsonWebKey GET /jwt-auth/jwks/{key}
SwaggyJenkins.BlueOceanApi getJsonWebToken GET /jwt-auth/token
SwaggyJenkins.BlueOceanApi getOrganisation GET /blue/rest/organizations/{organization}
SwaggyJenkins.BlueOceanApi getOrganisations GET /blue/rest/organizations/
SwaggyJenkins.BlueOceanApi getPipeline GET /blue/rest/organizations/{organization}/pipelines/{pipeline}
SwaggyJenkins.BlueOceanApi getPipelineActivities GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/activities
SwaggyJenkins.BlueOceanApi getPipelineBranch GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/
SwaggyJenkins.BlueOceanApi getPipelineBranchRun GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/runs/{run}
SwaggyJenkins.BlueOceanApi getPipelineBranches GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/branches
SwaggyJenkins.BlueOceanApi getPipelineFolder GET /blue/rest/organizations/{organization}/pipelines/{folder}/
SwaggyJenkins.BlueOceanApi getPipelineFolderPipeline GET /blue/rest/organizations/{organization}/pipelines/{folder}/pipelines/{pipeline}
SwaggyJenkins.BlueOceanApi getPipelineQueue GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/queue
SwaggyJenkins.BlueOceanApi getPipelineRun GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}
SwaggyJenkins.BlueOceanApi getPipelineRunLog GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log
SwaggyJenkins.BlueOceanApi getPipelineRunNode GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}
SwaggyJenkins.BlueOceanApi getPipelineRunNodeStep GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}
SwaggyJenkins.BlueOceanApi getPipelineRunNodeStepLog GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log
SwaggyJenkins.BlueOceanApi getPipelineRunNodeSteps GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps
SwaggyJenkins.BlueOceanApi getPipelineRunNodes GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes
SwaggyJenkins.BlueOceanApi getPipelineRuns GET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs
SwaggyJenkins.BlueOceanApi getPipelines GET /blue/rest/organizations/{organization}/pipelines/
SwaggyJenkins.BlueOceanApi getSCM GET /blue/rest/organizations/{organization}/scm/{scm}
SwaggyJenkins.BlueOceanApi getSCMOrganisationRepositories GET /blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories
SwaggyJenkins.BlueOceanApi getSCMOrganisationRepository GET /blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories/{repository}
SwaggyJenkins.BlueOceanApi getSCMOrganisations GET /blue/rest/organizations/{organization}/scm/{scm}/organizations
SwaggyJenkins.BlueOceanApi getUser GET /blue/rest/organizations/{organization}/users/{user}
SwaggyJenkins.BlueOceanApi getUserFavorites GET /blue/rest/users/{user}/favorites
SwaggyJenkins.BlueOceanApi getUsers GET /blue/rest/organizations/{organization}/users/
SwaggyJenkins.BlueOceanApi postPipelineRun POST /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/replay
SwaggyJenkins.BlueOceanApi postPipelineRuns POST /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs
SwaggyJenkins.BlueOceanApi putPipelineFavorite PUT /blue/rest/organizations/{organization}/pipelines/{pipeline}/favorite
SwaggyJenkins.BlueOceanApi putPipelineRun PUT /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/stop
SwaggyJenkins.BlueOceanApi search GET /blue/rest/search/
SwaggyJenkins.BlueOceanApi searchClasses GET /blue/rest/classes/
SwaggyJenkins.RemoteAccessApi getComputer GET /computer/api/json
SwaggyJenkins.RemoteAccessApi getJenkins GET /api/json
SwaggyJenkins.RemoteAccessApi getJob GET /job/{name}/api/json
SwaggyJenkins.RemoteAccessApi getJobConfig GET /job/{name}/config.xml
SwaggyJenkins.RemoteAccessApi getJobLastBuild GET /job/{name}/lastBuild/api/json
SwaggyJenkins.RemoteAccessApi getJobProgressiveText GET /job/{name}/{number}/logText/progressiveText
SwaggyJenkins.RemoteAccessApi getQueue GET /queue/api/json
SwaggyJenkins.RemoteAccessApi getQueueItem GET /queue/item/{number}/api/json
SwaggyJenkins.RemoteAccessApi getView GET /view/{name}/api/json
SwaggyJenkins.RemoteAccessApi getViewConfig GET /view/{name}/config.xml
SwaggyJenkins.RemoteAccessApi headJenkins HEAD /api/json
SwaggyJenkins.RemoteAccessApi postCreateItem POST /createItem
SwaggyJenkins.RemoteAccessApi postCreateView POST /createView
SwaggyJenkins.RemoteAccessApi postJobBuild POST /job/{name}/build
SwaggyJenkins.RemoteAccessApi postJobConfig POST /job/{name}/config.xml
SwaggyJenkins.RemoteAccessApi postJobDelete POST /job/{name}/doDelete
SwaggyJenkins.RemoteAccessApi postJobDisable POST /job/{name}/disable
SwaggyJenkins.RemoteAccessApi postJobEnable POST /job/{name}/enable
SwaggyJenkins.RemoteAccessApi postJobLastBuildStop POST /job/{name}/lastBuild/stop
SwaggyJenkins.RemoteAccessApi postViewConfig POST /view/{name}/config.xml

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

jenkins_auth

  • Type: HTTP basic authentication

jwt_auth

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

Readme

Keywords

none

Package Sidebar

Install

npm i swaggy-jenkins

Weekly Downloads

13

Version

3.0.1

License

Unlicense

Unpacked Size

767 kB

Total Files

87

Last publish

Collaborators

  • oapicf