51 lines
No EOL
2.4 KiB
JavaScript
51 lines
No EOL
2.4 KiB
JavaScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Defined Networking API
|
|
* <br/> <br/> This API enables automated administration of Defined Networking hosts, roles, logs, and more. To authenticate, obtain an api key to use as a bearer token from your Defined Networking admin panel [API Keys page](https://admin.defined.net/settings/api-keys). API keys must be given the appropriate permission scopes for every method and endpoint, as specified throughout this documentation. Please [contact us](https://www.defined.net/contact?reason=support) for any questions or issues. In the event of a token leak, please take care to [rotate the key](/guides/rotating-api-keys). <div className=\'introduction-end\'></div>
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
import * as runtime from '../runtime';
|
|
import { DownloadsList200ResponseFromJSON, DownloadsList200ResponseToJSON, } from '../models';
|
|
/**
|
|
*
|
|
*/
|
|
export class DownloadsApi extends runtime.BaseAPI {
|
|
/**
|
|
* Get a list of recently released software download links and basic info. This endpoint is unauthenticated. ### Request
|
|
* List software downloads
|
|
*/
|
|
async downloadsListRaw(initOverrides) {
|
|
const queryParameters = {};
|
|
const headerParameters = {};
|
|
if (this.configuration && this.configuration.accessToken) {
|
|
const token = this.configuration.accessToken;
|
|
const tokenString = await token("ApiToken", []);
|
|
if (tokenString) {
|
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
}
|
|
}
|
|
const response = await this.request({
|
|
path: `/v1/downloads`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => DownloadsList200ResponseFromJSON(jsonValue));
|
|
}
|
|
/**
|
|
* Get a list of recently released software download links and basic info. This endpoint is unauthenticated. ### Request
|
|
* List software downloads
|
|
*/
|
|
async downloadsList(initOverrides) {
|
|
const response = await this.downloadsListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
}
|
|
//# sourceMappingURL=DownloadsApi.js.map
|