node-gitlab-api
Advanced tools
Comparing version 3.0.0-rc.3 to 3.0.0-rc.4
@@ -36,3 +36,3 @@ "use strict"; | ||
var userId = _ref.userId; | ||
var url = userId ? "users/".concat(encodeURIComponent(userId), "/keys") : 'users/keys'; | ||
var url = userId ? "users/".concat(encodeURIComponent(userId), "/keys") : 'user/keys'; | ||
return _infrastructure.RequestHelper.get(this, url); | ||
@@ -46,3 +46,3 @@ } | ||
var url = userId ? "users/".concat(encodeURIComponent(userId), "/keys") : 'users/keys'; | ||
var url = userId ? "users/".concat(encodeURIComponent(userId), "/keys") : 'user/keys'; | ||
return _infrastructure.RequestHelper.post(this, url, { | ||
@@ -57,3 +57,3 @@ title: title, | ||
var kId = encodeURIComponent(keyId); | ||
return _infrastructure.RequestHelper.get(this, "users/keys/".concat(kId)); | ||
return _infrastructure.RequestHelper.get(this, "user/keys/".concat(kId)); | ||
} | ||
@@ -67,3 +67,3 @@ }, { | ||
var kId = encodeURIComponent(keyId); | ||
var url = userId ? "users/".concat(encodeURIComponent(userId), "/keys") : 'users/keys'; | ||
var url = userId ? "users/".concat(encodeURIComponent(userId), "/keys") : 'user/keys'; | ||
return _infrastructure.RequestHelper.delete(this, "".concat(url, "/").concat(kId)); | ||
@@ -70,0 +70,0 @@ } |
@@ -14,3 +14,3 @@ "use strict"; | ||
}) { | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys'; | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys'; | ||
return _infrastructure.RequestHelper.get(this, url); | ||
@@ -22,3 +22,3 @@ } | ||
} = {}) { | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys'; | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys'; | ||
return _infrastructure.RequestHelper.post(this, url, { | ||
@@ -32,3 +32,3 @@ title, | ||
const kId = encodeURIComponent(keyId); | ||
return _infrastructure.RequestHelper.get(this, `users/keys/${kId}`); | ||
return _infrastructure.RequestHelper.get(this, `user/keys/${kId}`); | ||
} | ||
@@ -40,3 +40,3 @@ | ||
const kId = encodeURIComponent(keyId); | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys'; | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys'; | ||
return _infrastructure.RequestHelper.delete(this, `${url}/${kId}`); | ||
@@ -43,0 +43,0 @@ } |
{ | ||
"name": "node-gitlab-api", | ||
"version": "3.0.0-rc.3", | ||
"version": "3.0.0-rc.4", | ||
"description": "Full NodeJS implementation of the GitLab API. Supports Promises, Async/Await.", | ||
@@ -5,0 +5,0 @@ "main": "dist/latest/index.js", |
@@ -5,3 +5,3 @@ import { BaseService, RequestHelper } from '../infrastructure'; | ||
all({ userId }) { | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys'; | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys'; | ||
@@ -12,3 +12,3 @@ return RequestHelper.get(this, url); | ||
create(title, key, { userId } = {}) { | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys'; | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys'; | ||
@@ -24,3 +24,3 @@ return RequestHelper.post(this, url, { | ||
return RequestHelper.get(this, `users/keys/${kId}`); | ||
return RequestHelper.get(this, `user/keys/${kId}`); | ||
} | ||
@@ -30,3 +30,3 @@ | ||
const kId = encodeURIComponent(keyId); | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys'; | ||
const url = userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys'; | ||
@@ -33,0 +33,0 @@ return RequestHelper.delete(this, `${url}/${kId}`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
323699