musicbrainz-api 0.18.1 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/musicbrainz-api.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface IMusicBrainzConfig {
|
|
|
50
50
|
username?: string;
|
|
51
51
|
password?: string;
|
|
52
52
|
};
|
|
53
|
-
baseUrl
|
|
53
|
+
baseUrl?: string;
|
|
54
54
|
appName?: string;
|
|
55
55
|
appVersion?: string;
|
|
56
56
|
/**
|
|
@@ -63,6 +63,9 @@ export interface IMusicBrainzConfig {
|
|
|
63
63
|
appContactInfo?: string;
|
|
64
64
|
disableRateLimiting?: boolean;
|
|
65
65
|
}
|
|
66
|
+
interface IInternalConfig extends IMusicBrainzConfig {
|
|
67
|
+
baseUrl: string;
|
|
68
|
+
}
|
|
66
69
|
export interface ICsrfSession {
|
|
67
70
|
sessionKey: string;
|
|
68
71
|
token: string;
|
|
@@ -72,7 +75,7 @@ export interface ISessionInformation {
|
|
|
72
75
|
loggedIn?: boolean;
|
|
73
76
|
}
|
|
74
77
|
export declare class MusicBrainzApi {
|
|
75
|
-
readonly config:
|
|
78
|
+
readonly config: IInternalConfig;
|
|
76
79
|
private rateLimiter;
|
|
77
80
|
private httpClient;
|
|
78
81
|
private session?;
|
package/lib/musicbrainz-api.js
CHANGED
|
@@ -30,9 +30,11 @@ export class MusicBrainzApi {
|
|
|
30
30
|
}
|
|
31
31
|
constructor(_config) {
|
|
32
32
|
this.config = {
|
|
33
|
-
|
|
33
|
+
...{
|
|
34
|
+
baseUrl: 'https://musicbrainz.org'
|
|
35
|
+
},
|
|
36
|
+
..._config
|
|
34
37
|
};
|
|
35
|
-
Object.assign(this.config, _config);
|
|
36
38
|
this.httpClient = new HttpClient({
|
|
37
39
|
baseUrl: this.config.baseUrl,
|
|
38
40
|
timeout: 20 * 1000,
|