Package Exports
- git-smelt
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (git-smelt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
git-smelt
🚧 A NPM package, that provides unified access to the APIs of different git hosting providers.
Installation and Usage
Installation
One of the following:
npm install git-smelt
yarn add git-smelt
CommonJS
const smelt = require('git-smelt');
smelt.github()
// or
const { github } = require('git-smelt');
github()
ES6+ / TypeScript
import { github } from 'git-smelt';
github()
Smelters
Smelters are what you use with git-smelt
to API's.
Currently, you can access some of the GutHub's and GitLab's API endpoints, with:
GitHubSmelter
/github()
for GitHub v3 REST APIGitLabSmelter
/gitlab()
for GitLab v4 REST API
getUser
Fetches info about a user.
github().getUser('username')
// .then()
// .catch()
gitlab().getUser('username')
// .then()
// .catch()
getRepo
Fetches info about:
- (
github
) a repository - (
gitlab
) a project
github().getUser('username')
// .then()
// .catch()
gitlab().getUser('username')
// .then()
// .catch()
Authors
- @konrad-szychowiak main creator