项目作者: cob16

项目描述 :
Autogenerated sdk for circle ci v2
高级语言:
项目地址: git://github.com/cob16/circleci-typescript-axios.git
创建时间: 2020-04-01T22:43:30Z
项目社区:https://github.com/cob16/circleci-typescript-axios

开源协议:MIT License

下载


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

  1. npm i circleci-typescript-axios --save

or to build form source

  1. git clone https://github.com/cob16/circleci-typescript-axios.git
  2. cd circleci-typescript-axios
  3. npm install
  4. npm run build

Example Usage

  1. import { PreviewApiFactory, Project } from 'circleci-typescript-axios';
  2. let client = PreviewApiFactory({
  3. apiKey: '<MY-API-KEY>',
  4. });
  5. client
  6. .getProjectBySlug('gh/cob16/circleci-lib')
  7. .then(resp => {
  8. let project: Project = resp.data;
  9. console.log(project.name);
  10. console.log(project.organization_name);
  11. console.log(project.slug);
  12. console.log(project.vcs_info);
  13. })
  14. .catch(error => {
  15. console.log(error);
  16. });

To see other methods See the full doc here