corona-warn-app
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.2.0](https://github.com/ffflorian/api-clients/tree/master/packages/corona-warn-app/compare/corona-warn-app@1.1.0...corona-warn-app@1.2.0) (2020-06-30) | ||
### Features | ||
* **corona-warn-app:** Add setApiUrl ([eb4126d](https://github.com/ffflorian/api-clients/tree/master/packages/corona-warn-app/commit/eb4126d)) | ||
# 1.1.0 (2020-06-24) | ||
@@ -8,0 +19,0 @@ |
/// <reference types="node" /> | ||
import type { AxiosInstance } from 'axios'; | ||
import type { ClientOptions } from '../interfaces'; | ||
export declare class ApplicationConfigurationAPI { | ||
protected readonly apiClient: AxiosInstance; | ||
protected readonly options: ClientOptions; | ||
constructor(apiClient: AxiosInstance, options: ClientOptions); | ||
constructor(apiClient: AxiosInstance); | ||
/** | ||
@@ -9,0 +7,0 @@ * Get application configuration for a country. |
@@ -14,5 +14,4 @@ "use strict"; | ||
class ApplicationConfigurationAPI { | ||
constructor(apiClient, options) { | ||
constructor(apiClient) { | ||
this.apiClient = apiClient; | ||
this.options = options; | ||
} | ||
@@ -19,0 +18,0 @@ /** |
/// <reference types="node" /> | ||
import type { AxiosInstance } from 'axios'; | ||
import type { ClientOptions } from '../interfaces'; | ||
export declare class DiagnosisKeysAPI { | ||
protected readonly apiClient: AxiosInstance; | ||
protected readonly options: ClientOptions; | ||
constructor(apiClient: AxiosInstance, options: ClientOptions); | ||
constructor(apiClient: AxiosInstance); | ||
/** | ||
@@ -9,0 +7,0 @@ * Get all countries for which diagnosis keys are available. |
@@ -14,5 +14,4 @@ "use strict"; | ||
class DiagnosisKeysAPI { | ||
constructor(apiClient, options) { | ||
constructor(apiClient) { | ||
this.apiClient = apiClient; | ||
this.options = options; | ||
} | ||
@@ -19,0 +18,0 @@ /** |
@@ -6,3 +6,8 @@ import type { API, ClientOptions } from './interfaces'; | ||
private readonly apiClient; | ||
constructor(options: ClientOptions); | ||
constructor(options?: ClientOptions); | ||
/** | ||
* Set a new API URL. | ||
* @param newUrl The new API URL | ||
*/ | ||
setApiUrl(newUrl: string): void; | ||
} |
@@ -9,9 +9,16 @@ "use strict"; | ||
this.apiClient = axios_1.default.create({ | ||
baseURL: CoronaWarnApp.BASE_URL, | ||
baseURL: (options === null || options === void 0 ? void 0 : options.apiUrl) || CoronaWarnApp.BASE_URL, | ||
}); | ||
this.api = { | ||
applicationConfiguration: new api_1.ApplicationConfigurationAPI(this.apiClient, options), | ||
diagnosisKeys: new api_1.DiagnosisKeysAPI(this.apiClient, options), | ||
applicationConfiguration: new api_1.ApplicationConfigurationAPI(this.apiClient), | ||
diagnosisKeys: new api_1.DiagnosisKeysAPI(this.apiClient), | ||
}; | ||
} | ||
/** | ||
* Set a new API URL. | ||
* @param newUrl The new API URL | ||
*/ | ||
setApiUrl(newUrl) { | ||
this.apiClient.defaults.baseURL = newUrl; | ||
} | ||
} | ||
@@ -18,0 +25,0 @@ exports.CoronaWarnApp = CoronaWarnApp; |
@@ -9,3 +9,3 @@ { | ||
"@types/node": "~14", | ||
"typedoc": "0.17.7", | ||
"typedoc": "0.17.8", | ||
"typescript": "3.9.5" | ||
@@ -36,3 +36,4 @@ }, | ||
}, | ||
"version": "1.1.0" | ||
"version": "1.2.0", | ||
"gitHead": "663a749849eb0f63322917ec5cc6592c7bb749e4" | ||
} |
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
55987
322