gitlab-fetch
v1.1.0
Published
A GitLab API client using the [whatwg-fetch API](https://github.com/whatwg/fetch) (written in TypeScript).
Downloads
118
Readme
A GitLab API client using the whatwg-fetch API (written in TypeScript).
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());
}
