Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.28 KB

README.md

File metadata and controls

45 lines (36 loc) · 1.28 KB

circleci-typescript-axios

circleci-typescript-axios

Autogenerated sdk for circle ci v2

Warning the circle v2 api is in preview and is currently making braking changes see breaking.md

See the full doc here

Getting started

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