A simple GitLab API library for Node.js using simple request-promise calls
# Install from npm
npm install simple-gitlab-apivar gitlab = require('simple-gitlab-api');
gitlab.get('/groups').then(function(groups) {
for (var i = 0; i < groups.length; i++)
console.log(groups[i].name);
});GITLAB_URL- the url to the GitLab server, e.g.https://gitlab.mycompany.comGITLAB_API_PREFIX- the API endpoint prefix including the API version, e.g./api/v4GITLAB_API_TOKEN- the access token to the API passed into the header, e.g. (as used incurl):
curl --request GET --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=master'