anilink-api-wrapper 1.18.4 → 1.18.6
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.
|
@@ -37,7 +37,7 @@ class AiringScheduleQuery extends APIWrapper_1.APIWrapper {
|
|
|
37
37
|
*/
|
|
38
38
|
airingSchedule(variables) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
if (!variables.id
|
|
40
|
+
if (!variables.id && !variables.mediaId) {
|
|
41
41
|
throw new Error('The id or mediaId variables are required');
|
|
42
42
|
}
|
|
43
43
|
const variableTypeMappings = {
|
|
@@ -26,6 +26,9 @@ class AniChartUserQuery extends APIWrapper_1.APIWrapper {
|
|
|
26
26
|
constructor(authToken) {
|
|
27
27
|
super('https://graphql.anilist.co');
|
|
28
28
|
this.authToken = authToken;
|
|
29
|
+
if (!this.authToken) {
|
|
30
|
+
throw new Error('AniChartUserQuery requires an authentication token. Create a new instance of AniLink and pass the token as an argument.');
|
|
31
|
+
}
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
34
|
* `aniChartUser` is a method that sends a query request to get AniChart users.
|