spinnaker-sdk
v0.1.0
Published
HTTP client to interact with [spinnaker API](https://spinnaker.io/docs/reference/api/docs.html)
Downloads
4
Readme
Spinnaker SDK
HTTP client to interact with spinnaker API
Github OAuth 2.0
Get Client ID and Secret Consult the GitHub OAuth 2.0 documentation and register a new OAuth 2.0 application to obtain a client ID and client secret.
Generate Github access token
spinnaker-sdk github-auth
Should generate token.json
file.
API request
Fetch applications
const { SpinnakerClient } = require('spinnaker-sdk')
const tokenData = require('./token.json')
const spinnaker = new SpinnakerClient('http://localhost:8084', tokenData)
async function run() {
await spinnaker.login()
const { data } = await spinnaker.axios.get(`/applications`)
console.log(data)
}
run()