libraries.io
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -6,24 +6,5 @@ import { LibrariesIOResult, PaginationOptions, Project, RepositoryWithDependencies } from '../../interfaces/'; | ||
constructor(requestService: RequestService); | ||
/** | ||
* Get a info for a repository. Currently only works for open source repositories. | ||
* @see https://libraries.io/api#repository | ||
* @param repositoryOwner The repository owner | ||
* @param repositoryName The repository name | ||
*/ | ||
getRepository(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>; | ||
/** | ||
* Get a list of dependencies for a repositories. Currently only works for open source repositories. | ||
* @see https://libraries.io/api#repository-dependencies | ||
* @param repositoryOwner The repository owner | ||
* @param repositoryName The repository name | ||
*/ | ||
getRepositoryWithDependencies(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>; | ||
/** | ||
* Get a list of packages referencing the given repository. | ||
* @see https://libraries.io/api#repository-projects | ||
* @param repositoryOwner The repository owner | ||
* @param repositoryName The repository name | ||
* @param options Pagination Options | ||
*/ | ||
getProjects(repositoryOwner: string, repositoryName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Endpoints_1 = require("../../Endpoints"); | ||
var GitHubRepositoryAPI = /** @class */ (function () { | ||
var GitHubRepositoryAPI = (function () { | ||
function GitHubRepositoryAPI(requestService) { | ||
this.requestService = requestService; | ||
} | ||
/** | ||
* Get a info for a repository. Currently only works for open source repositories. | ||
* @see https://libraries.io/api#repository | ||
* @param repositoryOwner The repository owner | ||
* @param repositoryName The repository name | ||
*/ | ||
GitHubRepositoryAPI.prototype.getRepository = function (repositoryOwner, repositoryName) { | ||
@@ -18,8 +12,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.Repository.repository(repositoryOwner, repositoryName); | ||
}; | ||
/** | ||
* Get a list of dependencies for a repositories. Currently only works for open source repositories. | ||
* @see https://libraries.io/api#repository-dependencies | ||
* @param repositoryOwner The repository owner | ||
* @param repositoryName The repository name | ||
*/ | ||
GitHubRepositoryAPI.prototype.getRepositoryWithDependencies = function (repositoryOwner, repositoryName) { | ||
@@ -29,9 +17,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.Repository.dependencies(repositoryOwner, repositoryName); | ||
}; | ||
/** | ||
* Get a list of packages referencing the given repository. | ||
* @see https://libraries.io/api#repository-projects | ||
* @param repositoryOwner The repository owner | ||
* @param repositoryName The repository name | ||
* @param options Pagination Options | ||
*/ | ||
GitHubRepositoryAPI.prototype.getProjects = function (repositoryOwner, repositoryName, options) { | ||
@@ -38,0 +19,0 @@ var endpoint = Endpoints_1.Endpoint.GitHub.Repository.projects(repositoryOwner, repositoryName); |
@@ -6,35 +6,6 @@ import { Contributor, LibrariesIOResult, PaginationOptions, PlatformType, Project, Repository } from '../../interfaces/'; | ||
constructor(requestService: RequestService); | ||
/** | ||
* Get information for a given user or organization. | ||
* @see https://libraries.io/api#user | ||
* @param userName The username | ||
*/ | ||
getUser(userName: string): Promise<LibrariesIOResult<Contributor>>; | ||
/** | ||
* Get repositories owned by a user. | ||
* @see https://libraries.io/api#user-repositories | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
getRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>; | ||
/** | ||
* Get a list of packages referencing the given user's repositories. | ||
* @see https://libraries.io/api#user-projects | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
getProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
/** | ||
* Get a list of packages that the given user has contributed to. | ||
* @see https://libraries.io/api#user-project-contributions | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
getContributedProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
/** | ||
* Get a list of repositories that the given user has contributed to. | ||
* @see https://libraries.io/api#user-repository-contributions | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
getContributedRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>; | ||
@@ -41,0 +12,0 @@ getDependencies(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; |
@@ -15,11 +15,6 @@ "use strict"; | ||
var Endpoints_1 = require("../../Endpoints"); | ||
var GitHubUserAPI = /** @class */ (function () { | ||
var GitHubUserAPI = (function () { | ||
function GitHubUserAPI(requestService) { | ||
this.requestService = requestService; | ||
} | ||
/** | ||
* Get information for a given user or organization. | ||
* @see https://libraries.io/api#user | ||
* @param userName The username | ||
*/ | ||
GitHubUserAPI.prototype.getUser = function (userName) { | ||
@@ -29,8 +24,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.User.user(userName); | ||
}; | ||
/** | ||
* Get repositories owned by a user. | ||
* @see https://libraries.io/api#user-repositories | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
GitHubUserAPI.prototype.getRepositories = function (userName, options) { | ||
@@ -40,8 +29,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName); | ||
}; | ||
/** | ||
* Get a list of packages referencing the given user's repositories. | ||
* @see https://libraries.io/api#user-projects | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
GitHubUserAPI.prototype.getProjects = function (userName, options) { | ||
@@ -51,8 +34,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName); | ||
}; | ||
/** | ||
* Get a list of packages that the given user has contributed to. | ||
* @see https://libraries.io/api#user-project-contributions | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
GitHubUserAPI.prototype.getContributedProjects = function (userName, options) { | ||
@@ -62,8 +39,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.User.contributedProjects(userName); | ||
}; | ||
/** | ||
* Get a list of repositories that the given user has contributed to. | ||
* @see https://libraries.io/api#user-repository-contributions | ||
* @param userName The username | ||
* @param options Pagination options | ||
*/ | ||
GitHubUserAPI.prototype.getContributedRepositories = function (userName, options) { | ||
@@ -73,9 +44,2 @@ var endpoint = Endpoints_1.Endpoint.GitHub.User.contributedRepositories(userName); | ||
}; | ||
/** | ||
* Get a list of unique packages that the given user's repositories list as a dependency. Ordered by frequency of use in those repositories. | ||
* @see https://libraries.io/api#user-dependencies | ||
* @param userName The username | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param options Pagination options | ||
*/ | ||
GitHubUserAPI.prototype.getDependencies = function (userName, platformOrOptions, options) { | ||
@@ -82,0 +46,0 @@ var endpoint = Endpoints_1.Endpoint.GitHub.User.contributedRepositories(userName); |
@@ -6,8 +6,3 @@ import { LibrariesIOResult, PaginationOptions, Platform } from '../interfaces/'; | ||
constructor(requestService: RequestService); | ||
/** | ||
* Get list of supported package managers. | ||
* @see https://libraries.io/api#platforms | ||
* @param options Pagination options | ||
*/ | ||
getPlatforms(options?: PaginationOptions): Promise<LibrariesIOResult<Platform[]>>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Endpoints_1 = require("../Endpoints"); | ||
var PlatformAPI = /** @class */ (function () { | ||
var PlatformAPI = (function () { | ||
function PlatformAPI(requestService) { | ||
this.requestService = requestService; | ||
} | ||
/** | ||
* Get list of supported package managers. | ||
* @see https://libraries.io/api#platforms | ||
* @param options Pagination options | ||
*/ | ||
PlatformAPI.prototype.getPlatforms = function (options) { | ||
@@ -14,0 +9,0 @@ var endpoint = Endpoints_1.Endpoint.platforms(); |
@@ -6,60 +6,10 @@ import { Contributor, LibrariesIOResult, PaginationOptions, PlatformType, Project, ProjectUsage, ProjectWithDependencies, Repository, SearchOptions } from '../interfaces/'; | ||
constructor(requestService: RequestService); | ||
/** | ||
* Get information about a package and it's versions. | ||
* @see https://libraries.io/api#project | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
getProject(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Project>>; | ||
/** | ||
* Get a list of dependencies for a version of a project, pass `latest` as version to get dependency info for the latest available version | ||
* @see https://libraries.io/api#project-dependencies | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param projectVersion | ||
*/ | ||
getProjectWithDependencies(platform: PlatformType, projectName: string, projectVersion: string): Promise<LibrariesIOResult<ProjectWithDependencies>>; | ||
/** | ||
* Get packages that have at least one version that depends on a given project. | ||
* @see https://libraries.io/api#project-dependents | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Pagination options | ||
*/ | ||
getDependendents(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
/** | ||
* Get repositories that depend on a given project. | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Pagination options | ||
*/ | ||
getDependendentRepositories(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>; | ||
/** | ||
* Get users that have contributed to a given project. | ||
* @see https://libraries.io/api#project-contributors | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Pagination options | ||
*/ | ||
getContributors(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Contributor[]>>; | ||
/** | ||
* Get breakdown of SourceRank score for a given project. | ||
* @see https://libraries.io/api#project-sourcerank | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
getSourceRank(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<number>>; | ||
/** | ||
* Get breakdown of version usage for a given project. | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
getUsage(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<ProjectUsage>>; | ||
/** | ||
* Search for projects. | ||
* @see https://libraries.io/api#project-search | ||
* @param query The search query | ||
* @param options Sorting, filter and pagination options | ||
*/ | ||
search(query: string, options?: SearchOptions): Promise<LibrariesIOResult<Project[]>>; | ||
} |
@@ -15,12 +15,6 @@ "use strict"; | ||
var Endpoints_1 = require("../Endpoints"); | ||
var ProjectAPI = /** @class */ (function () { | ||
var ProjectAPI = (function () { | ||
function ProjectAPI(requestService) { | ||
this.requestService = requestService; | ||
} | ||
/** | ||
* Get information about a package and it's versions. | ||
* @see https://libraries.io/api#project | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
ProjectAPI.prototype.getProject = function (platform, projectName) { | ||
@@ -30,9 +24,2 @@ var endpoint = Endpoints_1.Endpoint.Project.project(platform, projectName); | ||
}; | ||
/** | ||
* Get a list of dependencies for a version of a project, pass `latest` as version to get dependency info for the latest available version | ||
* @see https://libraries.io/api#project-dependencies | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param projectVersion | ||
*/ | ||
ProjectAPI.prototype.getProjectWithDependencies = function (platform, projectName, projectVersion) { | ||
@@ -42,9 +29,2 @@ var endpoint = Endpoints_1.Endpoint.Project.dependencies(platform, projectName, projectVersion); | ||
}; | ||
/** | ||
* Get packages that have at least one version that depends on a given project. | ||
* @see https://libraries.io/api#project-dependents | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Pagination options | ||
*/ | ||
ProjectAPI.prototype.getDependendents = function (platform, projectName, options) { | ||
@@ -54,8 +34,2 @@ var endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName); | ||
}; | ||
/** | ||
* Get repositories that depend on a given project. | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Pagination options | ||
*/ | ||
ProjectAPI.prototype.getDependendentRepositories = function (platform, projectName, options) { | ||
@@ -65,9 +39,2 @@ var endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName); | ||
}; | ||
/** | ||
* Get users that have contributed to a given project. | ||
* @see https://libraries.io/api#project-contributors | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Pagination options | ||
*/ | ||
ProjectAPI.prototype.getContributors = function (platform, projectName, options) { | ||
@@ -77,8 +44,2 @@ var endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName); | ||
}; | ||
/** | ||
* Get breakdown of SourceRank score for a given project. | ||
* @see https://libraries.io/api#project-sourcerank | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
ProjectAPI.prototype.getSourceRank = function (platform, projectName) { | ||
@@ -88,7 +49,2 @@ var endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName); | ||
}; | ||
/** | ||
* Get breakdown of version usage for a given project. | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
ProjectAPI.prototype.getUsage = function (platform, projectName) { | ||
@@ -98,8 +54,2 @@ var endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName); | ||
}; | ||
/** | ||
* Search for projects. | ||
* @see https://libraries.io/api#project-search | ||
* @param query The search query | ||
* @param options Sorting, filter and pagination options | ||
*/ | ||
ProjectAPI.prototype.search = function (query, options) { | ||
@@ -106,0 +56,0 @@ var endpoint = Endpoints_1.Endpoint.Project.search(); |
@@ -6,38 +6,7 @@ import { LibrariesIOHeaders, LibrariesIOResult, PaginationOptions, PlatformType, PreReleaseOptions, Subscription } from '../interfaces/'; | ||
constructor(requestService: RequestService); | ||
/** | ||
* Check if a users is subscribed to receive notifications about new releases of a project. | ||
* @see https://libraries.io/api#subscriptions-show | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
getSubscription(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Subscription | null>>; | ||
/** | ||
* List packages that a user is subscribed to recieved notifications about new releases. | ||
* @see https://libraries.io/api#subscriptions-index | ||
* @param options Pagination options | ||
*/ | ||
getAllSubscriptions(options?: PaginationOptions): Promise<LibrariesIOResult<Subscription[]>>; | ||
/** | ||
* Subscribe to receive notifications about new releases of a project. | ||
* @see https://libraries.io/api#subscriptions-create | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Subscription options | ||
*/ | ||
subscribe(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>; | ||
/** | ||
* Stop receiving release notifications from a project. | ||
* @see https://libraries.io/api#subscriptions-destroy | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
unsubscribe(platform: PlatformType, projectName: string): Promise<LibrariesIOHeaders>; | ||
/** | ||
* Update the options for a subscription. | ||
* @see https://libraries.io/api#subscriptions-update | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Subscription options | ||
*/ | ||
updateSubscription(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Endpoints_1 = require("../Endpoints"); | ||
var UserAPI = /** @class */ (function () { | ||
var UserAPI = (function () { | ||
function UserAPI(requestService) { | ||
this.requestService = requestService; | ||
} | ||
/** | ||
* Check if a users is subscribed to receive notifications about new releases of a project. | ||
* @see https://libraries.io/api#subscriptions-show | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
UserAPI.prototype.getSubscription = function (platform, projectName) { | ||
@@ -18,7 +12,2 @@ var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
}; | ||
/** | ||
* List packages that a user is subscribed to recieved notifications about new releases. | ||
* @see https://libraries.io/api#subscriptions-index | ||
* @param options Pagination options | ||
*/ | ||
UserAPI.prototype.getAllSubscriptions = function (options) { | ||
@@ -28,9 +17,2 @@ var endpoint = Endpoints_1.Endpoint.subscriptions(); | ||
}; | ||
/** | ||
* Subscribe to receive notifications about new releases of a project. | ||
* @see https://libraries.io/api#subscriptions-create | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Subscription options | ||
*/ | ||
UserAPI.prototype.subscribe = function (platform, projectName, options) { | ||
@@ -40,8 +22,2 @@ var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
}; | ||
/** | ||
* Stop receiving release notifications from a project. | ||
* @see https://libraries.io/api#subscriptions-destroy | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
*/ | ||
UserAPI.prototype.unsubscribe = function (platform, projectName) { | ||
@@ -51,9 +27,2 @@ var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
}; | ||
/** | ||
* Update the options for a subscription. | ||
* @see https://libraries.io/api#subscriptions-update | ||
* @param platform The project platform (e.g. "npm", "cargo", ...) | ||
* @param projectName The project name | ||
* @param options Subscription options | ||
*/ | ||
UserAPI.prototype.updateSubscription = function (platform, projectName, options) { | ||
@@ -60,0 +29,0 @@ var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); |
@@ -10,7 +10,3 @@ /// <reference types="node" /> | ||
constructor(options: ClientOptions); | ||
/** | ||
* Set a new API URL. | ||
* @param newUrl The new API url | ||
*/ | ||
setApiUrl(newUrl: URL): void; | ||
} |
@@ -5,3 +5,3 @@ "use strict"; | ||
var RequestService_1 = require("./RequestService"); | ||
var LibrariesIO = /** @class */ (function () { | ||
var LibrariesIO = (function () { | ||
function LibrariesIO(options) { | ||
@@ -26,6 +26,2 @@ if (typeof options === 'string') { | ||
} | ||
/** | ||
* Set a new API URL. | ||
* @param newUrl The new API url | ||
*/ | ||
LibrariesIO.prototype.setApiUrl = function (newUrl) { | ||
@@ -32,0 +28,0 @@ this.requestService.setApiUrl(newUrl); |
@@ -17,3 +17,3 @@ "use strict"; | ||
var interfaces_1 = require("./interfaces/"); | ||
var APIException = /** @class */ (function (_super) { | ||
var APIException = (function (_super) { | ||
__extends(APIException, _super); | ||
@@ -31,3 +31,3 @@ function APIException(message, serverMessage) { | ||
exports.APIException = APIException; | ||
var AuthenticationError = /** @class */ (function (_super) { | ||
var AuthenticationError = (function (_super) { | ||
__extends(AuthenticationError, _super); | ||
@@ -45,3 +45,3 @@ function AuthenticationError(message, serverMessage) { | ||
exports.AuthenticationError = AuthenticationError; | ||
var RateLimitError = /** @class */ (function (_super) { | ||
var RateLimitError = (function (_super) { | ||
__extends(RateLimitError, _super); | ||
@@ -59,3 +59,3 @@ function RateLimitError(message, serverMessage) { | ||
exports.RateLimitError = RateLimitError; | ||
var NotFoundError = /** @class */ (function (_super) { | ||
var NotFoundError = (function (_super) { | ||
__extends(NotFoundError, _super); | ||
@@ -73,3 +73,3 @@ function NotFoundError(message, serverMessage) { | ||
exports.NotFoundError = NotFoundError; | ||
var InvalidResponseError = /** @class */ (function (_super) { | ||
var InvalidResponseError = (function (_super) { | ||
__extends(InvalidResponseError, _super); | ||
@@ -76,0 +76,0 @@ function InvalidResponseError(message) { |
@@ -53,3 +53,3 @@ "use strict"; | ||
var interfaces_1 = require("./interfaces/"); | ||
var RequestService = /** @class */ (function () { | ||
var RequestService = (function () { | ||
function RequestService(options) { | ||
@@ -67,6 +67,6 @@ this.apiUrl = new url_1.URL('/api', 'https://libraries.io'); | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.request('delete', endpoint, parameters)]; | ||
case 0: return [4, this.request('delete', endpoint, parameters)]; | ||
case 1: | ||
_a = _b.sent(), rateLimit = _a.rateLimit, rateLimitRemaining = _a.rateLimitRemaining; | ||
return [2 /*return*/, { rateLimit: rateLimit, rateLimitRemaining: rateLimitRemaining }]; | ||
return [2, { rateLimit: rateLimit, rateLimitRemaining: rateLimitRemaining }]; | ||
} | ||
@@ -137,3 +137,3 @@ }); | ||
_b.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, axios_1.default.request(config)]; | ||
return [4, axios_1.default.request(config)]; | ||
case 2: | ||
@@ -147,3 +147,3 @@ _a = _b.sent(), data = _a.data, headers = _a.headers, status = _a.status; | ||
if (contentType.includes('application/json')) { | ||
return [2 /*return*/, { data: data, rateLimit: rateLimit, rateLimitRemaining: rateLimitRemaining, totalResults: totalResults }]; | ||
return [2, { data: data, rateLimit: rateLimit, rateLimitRemaining: rateLimitRemaining, totalResults: totalResults }]; | ||
} | ||
@@ -155,3 +155,3 @@ else { | ||
else if (status === interfaces_1.HttpStatus.NO_CONTENT) { | ||
return [2 /*return*/, { data: data, rateLimit: rateLimit, rateLimitRemaining: rateLimitRemaining }]; | ||
return [2, { data: data, rateLimit: rateLimit, rateLimitRemaining: rateLimitRemaining }]; | ||
} | ||
@@ -161,7 +161,7 @@ else { | ||
} | ||
return [3 /*break*/, 4]; | ||
return [3, 4]; | ||
case 3: | ||
error_1 = _b.sent(); | ||
throw APIException_1.ExceptionMapper(error_1); | ||
case 4: return [2 /*return*/]; | ||
case 4: return [2]; | ||
} | ||
@@ -168,0 +168,0 @@ }); |
{ | ||
"author": "Florian Keller <github@floriankeller.de>", | ||
"dependencies": { | ||
"@types/node": "10.12.7", | ||
"@types/node": "11.10.5", | ||
"axios": "0.18.0" | ||
@@ -9,14 +9,14 @@ }, | ||
"devDependencies": { | ||
"@types/jasmine": "3.3.8", | ||
"@types/jasmine": "3.3.9", | ||
"jasmine": "3.3.1", | ||
"nock": "10.0.6", | ||
"prettier": "1.16.1", | ||
"prettier": "1.16.4", | ||
"rimraf": "2.6.3", | ||
"touch": "3.1.0", | ||
"ts-node": "8.0.1", | ||
"tslint": "5.12.1", | ||
"tslint-config-prettier": "1.17.0", | ||
"ts-node": "8.0.3", | ||
"tslint": "5.13.1", | ||
"tslint-config-prettier": "1.18.0", | ||
"tslint-plugin-prettier": "2.0.1", | ||
"typedoc": "0.14.2", | ||
"typescript": "3.2.4" | ||
"typescript": "3.3.3333" | ||
}, | ||
@@ -35,6 +35,6 @@ "files": [ | ||
"name": "libraries.io", | ||
"repository": "https://github.com/ffflorian/libraries.io.js.git", | ||
"repository": "https://github.com/ffflorian/api-clients/tree/master/packages/libraries.io", | ||
"scripts": { | ||
"build": "tsc", | ||
"build:docs": "typedoc --out docs/ --mode modules --excludePrivate --excludeExternals --exclude \"**/*(index|Endpoints|RequestService).ts\"", | ||
"build:docs": "typedoc", | ||
"clear": "rimraf dist", | ||
@@ -51,3 +51,3 @@ "clear:docs": "rimraf docs", | ||
"types": "dist/index.d.ts", | ||
"version": "1.2.2" | ||
"version": "1.2.3" | ||
} |
@@ -1,2 +0,2 @@ | ||
# libraries.io.js [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=ffflorian/libraries.io.js)](https://dependabot.com) | ||
# libraries.io.js [![npm version](https://img.shields.io/npm/v/libraries.io.svg?style=flat)](https://www.npmjs.com/package/libraries.io) | ||
@@ -20,31 +20,28 @@ A [libraries.io](https://libraries.io) API client. For a documentation on the API see https://libraries.io/api. | ||
librariesIO.api.project.getProject('npm', 'grunt') | ||
.then(response => { | ||
// | ||
}) | ||
librariesIO.api.project.getProject('npm', 'grunt').then(response => { | ||
// | ||
}); | ||
librariesIO.api.project.search('grunt', { | ||
librariesIO.api.project | ||
.search('grunt', { | ||
filter: { | ||
platforms: ['npm'], | ||
licenses: ['MIT'] | ||
} | ||
licenses: ['MIT'], | ||
}, | ||
}) | ||
.then(projects => { | ||
// ... | ||
}) | ||
}); | ||
librariesIO.api.github.user.getUser('ffflorian') | ||
.then(user => { | ||
// ... | ||
}) | ||
librariesIO.api.github.user.getUser('ffflorian').then(user => { | ||
// ... | ||
}); | ||
librariesIO.api.platform.getPlatforms({page: 2, perPage: 5}) | ||
.then(platforms => { | ||
// ... | ||
}) | ||
librariesIO.api.platform.getPlatforms({page: 2, perPage: 5}).then(platforms => { | ||
// ... | ||
}); | ||
librariesIO.api.user.subscribe('npm', 'grunt') | ||
.then(subscription => { | ||
// ... | ||
}) | ||
librariesIO.api.user.subscribe('npm', 'grunt').then(subscription => { | ||
// ... | ||
}); | ||
``` | ||
@@ -51,0 +48,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
67
65892
984
54
+ Added@types/node@11.10.5(transitive)
- Removed@types/node@10.12.7(transitive)
Updated@types/node@11.10.5