3.0.1 • Published 2 months ago

swaggy-jenkins v3.0.1

Weekly downloads
6
License
Unlicense
Repository
-
Last release
2 months ago

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

ClassMethodHTTP requestDescription
SwaggyJenkins.BaseApigetCrumbGET /crumbIssuer/api/json
SwaggyJenkins.BlueOceanApideletePipelineQueueItemDELETE /blue/rest/organizations/{organization}/pipelines/{pipeline}/queue/{queue}
SwaggyJenkins.BlueOceanApigetAuthenticatedUserGET /blue/rest/organizations/{organization}/user/
SwaggyJenkins.BlueOceanApigetClassesGET /blue/rest/classes/{class}
SwaggyJenkins.BlueOceanApigetJsonWebKeyGET /jwt-auth/jwks/{key}
SwaggyJenkins.BlueOceanApigetJsonWebTokenGET /jwt-auth/token
SwaggyJenkins.BlueOceanApigetOrganisationGET /blue/rest/organizations/{organization}
SwaggyJenkins.BlueOceanApigetOrganisationsGET /blue/rest/organizations/
SwaggyJenkins.BlueOceanApigetPipelineGET /blue/rest/organizations/{organization}/pipelines/{pipeline}
SwaggyJenkins.BlueOceanApigetPipelineActivitiesGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/activities
SwaggyJenkins.BlueOceanApigetPipelineBranchGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/
SwaggyJenkins.BlueOceanApigetPipelineBranchRunGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/runs/{run}
SwaggyJenkins.BlueOceanApigetPipelineBranchesGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/branches
SwaggyJenkins.BlueOceanApigetPipelineFolderGET /blue/rest/organizations/{organization}/pipelines/{folder}/
SwaggyJenkins.BlueOceanApigetPipelineFolderPipelineGET /blue/rest/organizations/{organization}/pipelines/{folder}/pipelines/{pipeline}
SwaggyJenkins.BlueOceanApigetPipelineQueueGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/queue
SwaggyJenkins.BlueOceanApigetPipelineRunGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}
SwaggyJenkins.BlueOceanApigetPipelineRunLogGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log
SwaggyJenkins.BlueOceanApigetPipelineRunNodeGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}
SwaggyJenkins.BlueOceanApigetPipelineRunNodeStepGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}
SwaggyJenkins.BlueOceanApigetPipelineRunNodeStepLogGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log
SwaggyJenkins.BlueOceanApigetPipelineRunNodeStepsGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps
SwaggyJenkins.BlueOceanApigetPipelineRunNodesGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes
SwaggyJenkins.BlueOceanApigetPipelineRunsGET /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs
SwaggyJenkins.BlueOceanApigetPipelinesGET /blue/rest/organizations/{organization}/pipelines/
SwaggyJenkins.BlueOceanApigetSCMGET /blue/rest/organizations/{organization}/scm/{scm}
SwaggyJenkins.BlueOceanApigetSCMOrganisationRepositoriesGET /blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories
SwaggyJenkins.BlueOceanApigetSCMOrganisationRepositoryGET /blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories/{repository}
SwaggyJenkins.BlueOceanApigetSCMOrganisationsGET /blue/rest/organizations/{organization}/scm/{scm}/organizations
SwaggyJenkins.BlueOceanApigetUserGET /blue/rest/organizations/{organization}/users/{user}
SwaggyJenkins.BlueOceanApigetUserFavoritesGET /blue/rest/users/{user}/favorites
SwaggyJenkins.BlueOceanApigetUsersGET /blue/rest/organizations/{organization}/users/
SwaggyJenkins.BlueOceanApipostPipelineRunPOST /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/replay
SwaggyJenkins.BlueOceanApipostPipelineRunsPOST /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs
SwaggyJenkins.BlueOceanApiputPipelineFavoritePUT /blue/rest/organizations/{organization}/pipelines/{pipeline}/favorite
SwaggyJenkins.BlueOceanApiputPipelineRunPUT /blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/stop
SwaggyJenkins.BlueOceanApisearchGET /blue/rest/search/
SwaggyJenkins.BlueOceanApisearchClassesGET /blue/rest/classes/
SwaggyJenkins.RemoteAccessApigetComputerGET /computer/api/json
SwaggyJenkins.RemoteAccessApigetJenkinsGET /api/json
SwaggyJenkins.RemoteAccessApigetJobGET /job/{name}/api/json
SwaggyJenkins.RemoteAccessApigetJobConfigGET /job/{name}/config.xml
SwaggyJenkins.RemoteAccessApigetJobLastBuildGET /job/{name}/lastBuild/api/json
SwaggyJenkins.RemoteAccessApigetJobProgressiveTextGET /job/{name}/{number}/logText/progressiveText
SwaggyJenkins.RemoteAccessApigetQueueGET /queue/api/json
SwaggyJenkins.RemoteAccessApigetQueueItemGET /queue/item/{number}/api/json
SwaggyJenkins.RemoteAccessApigetViewGET /view/{name}/api/json
SwaggyJenkins.RemoteAccessApigetViewConfigGET /view/{name}/config.xml
SwaggyJenkins.RemoteAccessApiheadJenkinsHEAD /api/json
SwaggyJenkins.RemoteAccessApipostCreateItemPOST /createItem
SwaggyJenkins.RemoteAccessApipostCreateViewPOST /createView
SwaggyJenkins.RemoteAccessApipostJobBuildPOST /job/{name}/build
SwaggyJenkins.RemoteAccessApipostJobConfigPOST /job/{name}/config.xml
SwaggyJenkins.RemoteAccessApipostJobDeletePOST /job/{name}/doDelete
SwaggyJenkins.RemoteAccessApipostJobDisablePOST /job/{name}/disable
SwaggyJenkins.RemoteAccessApipostJobEnablePOST /job/{name}/enable
SwaggyJenkins.RemoteAccessApipostJobLastBuildStopPOST /job/{name}/lastBuild/stop
SwaggyJenkins.RemoteAccessApipostViewConfigPOST /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
3.0.1

2 months ago

2.0.1

2 years ago

1.1.2

2 years ago

2.0.0

2 years ago

1.3.4

2 years ago

1.5.0

2 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

6 years ago

0.0.2

7 years ago