0.1.0 • Published 2 years ago
spinnaker-sdk v0.1.0
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()
0.1.0
2 years ago