Skip to content

cob16/circleci-typescript-axios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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