libraries.io
Advanced tools
Comparing version 1.2.9 to 1.2.10
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.2.10](https://github.com/ffflorian/api-clients/tree/master/packages/libraries.io/compare/libraries.io@1.2.9...libraries.io@1.2.10) (2019-04-03) | ||
**Note:** Version bump only for package libraries.io | ||
## [1.2.9](https://github.com/ffflorian/api-clients/tree/master/packages/libraries.io/compare/libraries.io@1.2.8...libraries.io@1.2.9) (2019-03-31) | ||
@@ -8,0 +16,0 @@ |
@@ -1,6 +0,6 @@ | ||
import { LibrariesIOResult, PaginationOptions, Project, RepositoryWithDependencies } from '../../interfaces/'; | ||
import { RequestService } from '../../RequestService'; | ||
import { APIClient } from '@ffflorian/api-client'; | ||
import { PaginationOptions, Project, RepositoryWithDependencies } from '../../interfaces/'; | ||
export declare class GitHubRepositoryAPI { | ||
private readonly requestService; | ||
constructor(requestService: RequestService); | ||
private readonly apiClient; | ||
constructor(apiClient: APIClient); | ||
/** | ||
@@ -12,3 +12,3 @@ * Get a info for a repository. Currently only works for open source repositories. | ||
*/ | ||
getRepository(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>; | ||
getRepository(repositoryOwner: string, repositoryName: string): Promise<RepositoryWithDependencies>; | ||
/** | ||
@@ -20,3 +20,3 @@ * Get a list of dependencies for a repositories. Currently only works for open source repositories. | ||
*/ | ||
getRepositoryWithDependencies(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>; | ||
getRepositoryWithDependencies(repositoryOwner: string, repositoryName: string): Promise<RepositoryWithDependencies>; | ||
/** | ||
@@ -29,3 +29,3 @@ * Get a list of packages referencing the given repository. | ||
*/ | ||
getProjects(repositoryOwner: string, repositoryName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
getProjects(repositoryOwner: string, repositoryName: string, options?: PaginationOptions): Promise<Project[]>; | ||
} |
@@ -5,4 +5,4 @@ "use strict"; | ||
var GitHubRepositoryAPI = /** @class */ (function () { | ||
function GitHubRepositoryAPI(requestService) { | ||
this.requestService = requestService; | ||
function GitHubRepositoryAPI(apiClient) { | ||
this.apiClient = apiClient; | ||
} | ||
@@ -17,3 +17,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.Repository.repository(repositoryOwner, repositoryName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -28,3 +28,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.Repository.dependencies(repositoryOwner, repositoryName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -40,3 +40,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.Repository.projects(repositoryOwner, repositoryName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -43,0 +43,0 @@ return GitHubRepositoryAPI; |
@@ -1,6 +0,6 @@ | ||
import { Contributor, LibrariesIOResult, PaginationOptions, PlatformType, Project, Repository } from '../../interfaces/'; | ||
import { RequestService } from '../../RequestService'; | ||
import { APIClient } from '@ffflorian/api-client'; | ||
import { Contributor, PaginationOptions, PlatformType, Project, Repository } from '../../interfaces/'; | ||
export declare class GitHubUserAPI { | ||
private readonly requestService; | ||
constructor(requestService: RequestService); | ||
private readonly apiClient; | ||
constructor(apiClient: APIClient); | ||
/** | ||
@@ -11,3 +11,3 @@ * Get information for a given user or organization. | ||
*/ | ||
getUser(userName: string): Promise<LibrariesIOResult<Contributor>>; | ||
getUser(userName: string): Promise<Contributor>; | ||
/** | ||
@@ -19,3 +19,3 @@ * Get repositories owned by a user. | ||
*/ | ||
getRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>; | ||
getRepositories(userName: string, options?: PaginationOptions): Promise<Repository[]>; | ||
/** | ||
@@ -27,3 +27,3 @@ * Get a list of packages referencing the given user's repositories. | ||
*/ | ||
getProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
getProjects(userName: string, options?: PaginationOptions): Promise<Project[]>; | ||
/** | ||
@@ -35,3 +35,3 @@ * Get a list of packages that the given user has contributed to. | ||
*/ | ||
getContributedProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
getContributedProjects(userName: string, options?: PaginationOptions): Promise<Project[]>; | ||
/** | ||
@@ -43,5 +43,5 @@ * Get a list of repositories that the given user has contributed to. | ||
*/ | ||
getContributedRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>; | ||
getDependencies(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
getDependencies(userName: string, platform?: PlatformType, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
getContributedRepositories(userName: string, options?: PaginationOptions): Promise<Repository[]>; | ||
getDependencies(userName: string, options?: PaginationOptions): Promise<Project[]>; | ||
getDependencies(userName: string, platform?: PlatformType, options?: PaginationOptions): Promise<Project[]>; | ||
} |
@@ -16,4 +16,4 @@ "use strict"; | ||
var GitHubUserAPI = /** @class */ (function () { | ||
function GitHubUserAPI(requestService) { | ||
this.requestService = requestService; | ||
function GitHubUserAPI(apiClient) { | ||
this.apiClient = apiClient; | ||
} | ||
@@ -27,3 +27,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.User.user(userName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -38,3 +38,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -49,3 +49,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -60,3 +60,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.User.contributedProjects(userName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -71,3 +71,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.GitHub.User.contributedRepositories(userName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -92,3 +92,3 @@ /** | ||
} | ||
return this.requestService.get(endpoint, parameters); | ||
return this.apiClient.requestService.get(endpoint, { data: parameters }); | ||
}; | ||
@@ -95,0 +95,0 @@ return GitHubUserAPI; |
@@ -1,6 +0,6 @@ | ||
import { LibrariesIOResult, PaginationOptions, Platform } from '../interfaces/'; | ||
import { RequestService } from '../RequestService'; | ||
import { APIClient } from '@ffflorian/api-client'; | ||
import { PaginationOptions, Platform } from '../interfaces/'; | ||
export declare class PlatformAPI { | ||
private readonly requestService; | ||
constructor(requestService: RequestService); | ||
private readonly apiClient; | ||
constructor(apiClient: APIClient); | ||
/** | ||
@@ -11,3 +11,3 @@ * Get list of supported package managers. | ||
*/ | ||
getPlatforms(options?: PaginationOptions): Promise<LibrariesIOResult<Platform[]>>; | ||
getPlatforms(options?: PaginationOptions): Promise<Platform[]>; | ||
} |
@@ -5,4 +5,4 @@ "use strict"; | ||
var PlatformAPI = /** @class */ (function () { | ||
function PlatformAPI(requestService) { | ||
this.requestService = requestService; | ||
function PlatformAPI(apiClient) { | ||
this.apiClient = apiClient; | ||
} | ||
@@ -16,3 +16,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.platforms(); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -19,0 +19,0 @@ return PlatformAPI; |
@@ -1,6 +0,6 @@ | ||
import { Contributor, LibrariesIOResult, PaginationOptions, PlatformType, Project, ProjectUsage, ProjectWithDependencies, Repository, SearchOptions } from '../interfaces/'; | ||
import { RequestService } from '../RequestService'; | ||
import { APIClient } from '@ffflorian/api-client'; | ||
import { Contributor, PaginationOptions, PlatformType, Project, ProjectUsage, ProjectWithDependencies, Repository, SearchOptions } from '../interfaces/'; | ||
export declare class ProjectAPI { | ||
private readonly requestService; | ||
constructor(requestService: RequestService); | ||
private readonly apiClient; | ||
constructor(apiClient: APIClient); | ||
/** | ||
@@ -12,3 +12,3 @@ * Get information about a package and it's versions. | ||
*/ | ||
getProject(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Project>>; | ||
getProject(platform: PlatformType, projectName: string): Promise<Project>; | ||
/** | ||
@@ -21,3 +21,3 @@ * Get a list of dependencies for a version of a project, pass `latest` as version to get dependency info for the latest available version | ||
*/ | ||
getProjectWithDependencies(platform: PlatformType, projectName: string, projectVersion: string): Promise<LibrariesIOResult<ProjectWithDependencies>>; | ||
getProjectWithDependencies(platform: PlatformType, projectName: string, projectVersion: string): Promise<ProjectWithDependencies>; | ||
/** | ||
@@ -30,3 +30,3 @@ * Get packages that have at least one version that depends on a given project. | ||
*/ | ||
getDependendents(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>; | ||
getDependendents(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<Project[]>; | ||
/** | ||
@@ -38,3 +38,3 @@ * Get repositories that depend on a given project. | ||
*/ | ||
getDependendentRepositories(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>; | ||
getDependendentRepositories(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<Repository[]>; | ||
/** | ||
@@ -47,3 +47,3 @@ * Get users that have contributed to a given project. | ||
*/ | ||
getContributors(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Contributor[]>>; | ||
getContributors(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<Contributor[]>; | ||
/** | ||
@@ -55,3 +55,3 @@ * Get breakdown of SourceRank score for a given project. | ||
*/ | ||
getSourceRank(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<number>>; | ||
getSourceRank(platform: PlatformType, projectName: string): Promise<number>; | ||
/** | ||
@@ -62,3 +62,3 @@ * Get breakdown of version usage for a given project. | ||
*/ | ||
getUsage(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<ProjectUsage>>; | ||
getUsage(platform: PlatformType, projectName: string): Promise<ProjectUsage>; | ||
/** | ||
@@ -70,3 +70,3 @@ * Search for projects. | ||
*/ | ||
search(query: string, options?: SearchOptions): Promise<LibrariesIOResult<Project[]>>; | ||
search(query: string, options?: SearchOptions): Promise<Project[]>; | ||
} |
@@ -16,4 +16,4 @@ "use strict"; | ||
var ProjectAPI = /** @class */ (function () { | ||
function ProjectAPI(requestService) { | ||
this.requestService = requestService; | ||
function ProjectAPI(apiClient) { | ||
this.apiClient = apiClient; | ||
} | ||
@@ -28,3 +28,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.project(platform, projectName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -40,3 +40,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.dependencies(platform, projectName, projectVersion); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -52,3 +52,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -63,3 +63,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -75,3 +75,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -86,3 +86,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -96,3 +96,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -107,3 +107,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.Project.search(); | ||
return this.requestService.get(endpoint, __assign({}, options, { query: query })); | ||
return this.apiClient.requestService.get(endpoint, { data: __assign({}, options, { q: query }) }); | ||
}; | ||
@@ -110,0 +110,0 @@ return ProjectAPI; |
@@ -1,6 +0,6 @@ | ||
import { LibrariesIOHeaders, LibrariesIOResult, PaginationOptions, PlatformType, PreReleaseOptions, Subscription } from '../interfaces/'; | ||
import { RequestService } from '../RequestService'; | ||
import { APIClient } from '@ffflorian/api-client'; | ||
import { LibrariesIOHeaders, PaginationOptions, PlatformType, PreReleaseOptions, Subscription } from '../interfaces/'; | ||
export declare class UserAPI { | ||
private readonly requestService; | ||
constructor(requestService: RequestService); | ||
private readonly apiClient; | ||
constructor(apiClient: APIClient); | ||
/** | ||
@@ -12,3 +12,3 @@ * Check if a users is subscribed to receive notifications about new releases of a project. | ||
*/ | ||
getSubscription(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Subscription | null>>; | ||
getSubscription(platform: PlatformType, projectName: string): Promise<Subscription | null>; | ||
/** | ||
@@ -19,3 +19,3 @@ * List packages that a user is subscribed to recieved notifications about new releases. | ||
*/ | ||
getAllSubscriptions(options?: PaginationOptions): Promise<LibrariesIOResult<Subscription[]>>; | ||
getAllSubscriptions(options?: PaginationOptions): Promise<Subscription[]>; | ||
/** | ||
@@ -28,3 +28,3 @@ * Subscribe to receive notifications about new releases of a project. | ||
*/ | ||
subscribe(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>; | ||
subscribe(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<Subscription>; | ||
/** | ||
@@ -44,3 +44,3 @@ * Stop receiving release notifications from a project. | ||
*/ | ||
updateSubscription(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>; | ||
updateSubscription(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<Subscription>; | ||
} |
@@ -5,4 +5,4 @@ "use strict"; | ||
var UserAPI = /** @class */ (function () { | ||
function UserAPI(requestService) { | ||
this.requestService = requestService; | ||
function UserAPI(apiClient) { | ||
this.apiClient = apiClient; | ||
} | ||
@@ -17,3 +17,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
return this.requestService.get(endpoint); | ||
return this.apiClient.requestService.get(endpoint); | ||
}; | ||
@@ -27,3 +27,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.subscriptions(); | ||
return this.requestService.get(endpoint, options); | ||
return this.apiClient.requestService.get(endpoint, { data: options }); | ||
}; | ||
@@ -39,3 +39,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
return this.requestService.post(endpoint, options); | ||
return this.apiClient.requestService.post(endpoint, { data: options }); | ||
}; | ||
@@ -50,3 +50,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
return this.requestService.delete(endpoint); | ||
return this.apiClient.requestService.delete(endpoint); | ||
}; | ||
@@ -62,3 +62,3 @@ /** | ||
var endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName); | ||
return this.requestService.put(endpoint, options); | ||
return this.apiClient.requestService.put(endpoint, { data: options }); | ||
}; | ||
@@ -65,0 +65,0 @@ return UserAPI; |
@@ -1,3 +0,3 @@ | ||
export * from './APIClient'; | ||
export * from './LibrariesIO'; | ||
export * from './APIException'; | ||
export * from './interfaces/'; |
@@ -6,5 +6,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./APIClient")); | ||
__export(require("./LibrariesIO")); | ||
__export(require("./APIException")); | ||
__export(require("./interfaces/")); | ||
//# sourceMappingURL=index.js.map |
export * from './API'; | ||
export * from './Contributor'; | ||
export * from './LibrariesIOResult'; | ||
export * from './LibrariesIOHeaders'; | ||
export * from './Options'; | ||
@@ -5,0 +5,0 @@ export * from './Platform'; |
@@ -19,12 +19,14 @@ /// <reference types="node" /> | ||
page?: number; | ||
perPage?: number; | ||
per_page?: number; | ||
} | ||
export interface SearchOptions extends PaginationOptions { | ||
sortBy?: SortType; | ||
/** sort by */ | ||
sort?: SortType; | ||
filter?: FilterOptions; | ||
} | ||
export interface RequestOptions extends SearchOptions, PreReleaseOptions { | ||
apiKey?: string; | ||
api_key?: string; | ||
platform?: PlatformType; | ||
query?: string; | ||
/** query */ | ||
q?: string; | ||
} | ||
@@ -31,0 +33,0 @@ export declare type HttpMethod = 'delete' | 'get' | 'post' | 'put'; |
{ | ||
"author": "Florian Keller <github@floriankeller.de>", | ||
"dependencies": { | ||
"@types/node": "11.12.0", | ||
"@types/node": "11.13.0", | ||
"axios": "0.18.0" | ||
@@ -35,4 +35,4 @@ }, | ||
}, | ||
"version": "1.2.9", | ||
"gitHead": "daf56610d1d438d0f4f9a0f5a213ccbf55d6ac03" | ||
"version": "1.2.10", | ||
"gitHead": "139620af5229fde0d29b811e07f120df41955d97" | ||
} |
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
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
68073
1125
+ Added@types/node@11.13.0(transitive)
- Removed@types/node@11.12.0(transitive)
Updated@types/node@11.13.0