gitlab-fetch
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

A GitLab API client using the whatwg-fetch API (written in TypeScript).

NPM

Currently implemented APIs

Usage

import { ProjectsApi, Config, Project, loadConfig } from 'gitlab-fetch';
 
async function run(): Project[] {
  const config: Config = {
    baseUrl: 'https://gitlab.com/api',
    auth: {
      privateToken: process.env.GITLAB_API_TOKEN,
    }
  };
  // Load from `~/.gitlab-fetchrc` (or similar, see https://www.npmjs.com/package/rc)
  // const config = loadConfig();
  const projectsApi = new ProjectsApi(config);
  return await projectsApi.getAll());
}

Readme

Keywords

Package Sidebar

Install

npm i gitlab-fetch

Weekly Downloads

29

Version

1.1.0

License

MIT

Unpacked Size

90.7 kB

Total Files

132

Last publish

Collaborators

  • janslow