Autogenerated sdk for circle ci v2
Warning the circle v2 api is in preview and is currently making braking changes see breaking.md
npm i circleci-typescript-axios --save
or to build form source
git clone https://github.com/cob16/circleci-typescript-axios.git
cd circleci-typescript-axios
npm install
npm run build
Example Usage
import { PreviewApiFactory, Project } from 'circleci-typescript-axios';
let client = PreviewApiFactory({
apiKey: '<MY-API-KEY>',
});
client
.getProjectBySlug('gh/cob16/circleci-lib')
.then(resp => {
let project: Project = resp.data;
console.log(project.name);
console.log(project.organization_name);
console.log(project.slug);
console.log(project.vcs_info);
})
.catch(error => {
console.log(error);
});
To see other methods See the full doc here