Comparing version
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.3.5](https://github.com/ffflorian/api-clients/tree/master/packages/crates.io/compare/crates.io@0.3.4...crates.io@0.3.5) (2019-03-31) | ||
**Note:** Version bump only for package crates.io | ||
## [0.3.4](https://github.com/ffflorian/api-clients/tree/master/packages/crates.io/compare/crates.io@0.3.3...crates.io@0.3.4) (2019-03-27) | ||
@@ -8,0 +16,0 @@ |
@@ -7,18 +7,75 @@ import { APIClient } from '@ffflorian/api-client'; | ||
constructor(apiClient: APIClient, apiKey?: string); | ||
/** | ||
* Retrieve the owners of a crate. | ||
* @param packageName The package name | ||
*/ | ||
following(packageName: string): Promise<FollowingResult>; | ||
/** | ||
* Retrieve the owners of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getAuthors(packageName: string, version: string): Promise<AuthorsResult>; | ||
/** | ||
* Retrieve information of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getCrate(packageName: string): Promise<CrateResult>; | ||
/** | ||
* Retrieve a page of crates, optionally constrained by a query. | ||
* @param query The search query | ||
* @param options The search options | ||
*/ | ||
getCrates(query: string, options?: SearchOptions): Promise<SearchResult>; | ||
/** | ||
* Retrieve a download link for a certain version of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getDownloadUrl(packageName: string, version: string): Promise<UrlResult>; | ||
/** | ||
* Retrieve the dependencies of a crate version. | ||
* @param packageName The package name | ||
*/ | ||
getDependencies(packageName: string): Promise<DependenciesResult>; | ||
/** | ||
* Retrieve download stats for a crate. | ||
* @param packageName The package name | ||
*/ | ||
getDownloads(packageName: string): Promise<DownloadsResult>; | ||
/** | ||
* Retrieve the owners of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getOwners(packageName: string): Promise<UsersResult>; | ||
/** | ||
* Retrieve the reverse dependencies of a crate version. | ||
* @param packageName The package name | ||
*/ | ||
getReverseDependencies(packageName: string): Promise<ReverseDependenciesResult>; | ||
/** | ||
* Retrieve the team owner of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getTeamOwner(packageName: string): Promise<TeamsResult>; | ||
/** | ||
* Retrieve the user owner of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getUserOwner(packageName: string): Promise<UsersResult>; | ||
/** | ||
* Retrieve a specific version of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getVersion(packageName: string, version: string): Promise<Version>; | ||
/** | ||
* Retrieve all versions of a crate. | ||
* @param packageName The package name | ||
*/ | ||
getVersions(packageName: string): Promise<{ | ||
versions: Version[]; | ||
}>; | ||
/** | ||
* Set a new API key. | ||
* @param apiKey The API key | ||
*/ | ||
setApiKey(apiKey: string): void; | ||
} |
@@ -15,3 +15,3 @@ "use strict"; | ||
var Endpoints_1 = require("../Endpoints"); | ||
var CratesAPI = (function () { | ||
var CratesAPI = /** @class */ (function () { | ||
function CratesAPI(apiClient, apiKey) { | ||
@@ -21,2 +21,6 @@ this.apiClient = apiClient; | ||
} | ||
/** | ||
* Retrieve the owners of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.following = function (packageName) { | ||
@@ -34,2 +38,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.following(packageName); | ||
}; | ||
/** | ||
* Retrieve the owners of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getAuthors = function (packageName, version) { | ||
@@ -39,2 +47,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.authors(packageName, version); | ||
}; | ||
/** | ||
* Retrieve information of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getCrate = function (packageName) { | ||
@@ -44,2 +56,7 @@ var endpoint = Endpoints_1.Endpoint.Crates.crate(packageName); | ||
}; | ||
/** | ||
* Retrieve a page of crates, optionally constrained by a query. | ||
* @param query The search query | ||
* @param options The search options | ||
*/ | ||
CratesAPI.prototype.getCrates = function (query, options) { | ||
@@ -52,2 +69,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.crates(); | ||
}; | ||
/** | ||
* Retrieve a download link for a certain version of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getDownloadUrl = function (packageName, version) { | ||
@@ -57,2 +78,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.download(packageName, version); | ||
}; | ||
/** | ||
* Retrieve the dependencies of a crate version. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getDependencies = function (packageName) { | ||
@@ -62,2 +87,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.dependencies(packageName); | ||
}; | ||
/** | ||
* Retrieve download stats for a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getDownloads = function (packageName) { | ||
@@ -67,2 +96,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.downloads(packageName); | ||
}; | ||
/** | ||
* Retrieve the owners of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getOwners = function (packageName) { | ||
@@ -72,2 +105,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.owners(packageName); | ||
}; | ||
/** | ||
* Retrieve the reverse dependencies of a crate version. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getReverseDependencies = function (packageName) { | ||
@@ -77,2 +114,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.reverseDependencies(packageName); | ||
}; | ||
/** | ||
* Retrieve the team owner of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getTeamOwner = function (packageName) { | ||
@@ -82,2 +123,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.ownerTeam(packageName); | ||
}; | ||
/** | ||
* Retrieve the user owner of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getUserOwner = function (packageName) { | ||
@@ -87,2 +132,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.ownerUser(packageName); | ||
}; | ||
/** | ||
* Retrieve a specific version of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getVersion = function (packageName, version) { | ||
@@ -92,2 +141,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.version(packageName, version); | ||
}; | ||
/** | ||
* Retrieve all versions of a crate. | ||
* @param packageName The package name | ||
*/ | ||
CratesAPI.prototype.getVersions = function (packageName) { | ||
@@ -97,2 +150,6 @@ var endpoint = Endpoints_1.Endpoint.Crates.versions(packageName); | ||
}; | ||
/** | ||
* Set a new API key. | ||
* @param apiKey The API key | ||
*/ | ||
CratesAPI.prototype.setApiKey = function (apiKey) { | ||
@@ -99,0 +156,0 @@ this.apiKey = apiKey; |
@@ -8,5 +8,16 @@ import { API, ClientOptions, Summary } from './interfaces'; | ||
constructor(options?: ClientOptions); | ||
/** | ||
* Retrieve a summary containing crates.io wide information. | ||
*/ | ||
summary(): Promise<Summary>; | ||
/** | ||
* Set a new API URL. | ||
* @param newUrl The new API url | ||
*/ | ||
setApiUrl(newUrl: string): void; | ||
/** | ||
* Set a new API key. | ||
* @param apiKey The API key | ||
*/ | ||
setApiKey(apiKey: string): void; | ||
} |
@@ -6,3 +6,3 @@ "use strict"; | ||
var Endpoints_1 = require("./Endpoints"); | ||
var CratesIO = (function () { | ||
var CratesIO = /** @class */ (function () { | ||
function CratesIO(options) { | ||
@@ -15,2 +15,5 @@ this.options = typeof options === 'string' ? { apiKey: options } : options || {}; | ||
} | ||
/** | ||
* Retrieve a summary containing crates.io wide information. | ||
*/ | ||
CratesIO.prototype.summary = function () { | ||
@@ -20,5 +23,13 @@ var endpoint = Endpoints_1.Endpoint.summary(); | ||
}; | ||
/** | ||
* Set a new API URL. | ||
* @param newUrl The new API url | ||
*/ | ||
CratesIO.prototype.setApiUrl = function (newUrl) { | ||
this.apiClient.setApiUrl(newUrl); | ||
}; | ||
/** | ||
* Set a new API key. | ||
* @param apiKey The API key | ||
*/ | ||
CratesIO.prototype.setApiKey = function (apiKey) { | ||
@@ -25,0 +36,0 @@ this.options.apiKey = apiKey; |
{ | ||
"author": "Florian Keller <github@floriankeller.de>", | ||
"dependencies": { | ||
"@ffflorian/api-client": "0.3.0" | ||
"@ffflorian/api-client": "0.3.1" | ||
}, | ||
@@ -10,3 +10,3 @@ "description": "A crates.io API client", | ||
"rimraf": "2.6.3", | ||
"typescript": "3.3.4000" | ||
"typescript": "3.4.1" | ||
}, | ||
@@ -32,4 +32,4 @@ "files": [ | ||
}, | ||
"version": "0.3.4", | ||
"gitHead": "2212409acec60c1b61a1ccb558b9a89367e1314b" | ||
"version": "0.3.5", | ||
"gitHead": "daf56610d1d438d0f4f9a0f5a213ccbf55d6ac03" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32807
13.48%601
29.25%+ Added
- Removed
Updated