anilink-api-wrapper 1.0.0 → 1.2.0

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.
Files changed (92) hide show
  1. package/dist/AniLink.js +10 -1
  2. package/dist/apis/anilist/interfaces/CoverImage.js +9 -0
  3. package/dist/apis/anilist/interfaces/ExternalLink.js +8 -0
  4. package/dist/apis/anilist/interfaces/FuzzyDate.js +6 -0
  5. package/dist/apis/anilist/interfaces/Image.js +7 -0
  6. package/dist/apis/anilist/interfaces/MediaListEntry.js +7 -0
  7. package/dist/apis/anilist/interfaces/Name.js +9 -0
  8. package/dist/apis/anilist/interfaces/NextAiringEpisode.js +8 -0
  9. package/dist/apis/anilist/interfaces/Ranking.js +13 -0
  10. package/dist/apis/anilist/interfaces/ScoreDistribution.js +7 -0
  11. package/dist/apis/anilist/interfaces/StatusDistribution.js +7 -0
  12. package/dist/apis/anilist/interfaces/StreamingEpisode.js +9 -0
  13. package/dist/apis/anilist/interfaces/Tag.js +12 -0
  14. package/dist/apis/anilist/interfaces/Title.js +9 -0
  15. package/dist/apis/anilist/interfaces/Trailer.js +8 -0
  16. package/dist/apis/anilist/interfaces/UserStats.js +13 -0
  17. package/dist/apis/anilist/interfaces/responses/AiringSchedule.js +12 -0
  18. package/dist/apis/anilist/interfaces/responses/Character.js +28 -0
  19. package/dist/apis/anilist/interfaces/responses/Media.js +208 -0
  20. package/dist/apis/anilist/interfaces/responses/MediaList.js +30 -0
  21. package/dist/apis/anilist/interfaces/responses/MediaListCollectionResponse.js +39 -0
  22. package/dist/apis/anilist/interfaces/responses/MediaTag.js +2 -0
  23. package/dist/apis/anilist/interfaces/responses/MediaTagCollection.js +2 -0
  24. package/dist/apis/anilist/interfaces/responses/MediaTrend.js +15 -0
  25. package/dist/apis/anilist/interfaces/responses/Staff.js +53 -0
  26. package/dist/apis/anilist/interfaces/responses/User.js +360 -0
  27. package/dist/apis/anilist/query/AiringSchedule.js +3 -115
  28. package/dist/apis/anilist/query/Character.js +2 -36
  29. package/dist/apis/anilist/query/GenreCollection.js +32 -0
  30. package/dist/apis/anilist/query/Media.js +3 -200
  31. package/dist/apis/anilist/query/MediaList.js +2 -137
  32. package/dist/apis/anilist/query/MediaListCollection.js +2 -623
  33. package/dist/apis/anilist/query/MediaTagCollection.js +35 -0
  34. package/dist/apis/anilist/query/MediaTrend.js +3 -117
  35. package/dist/apis/anilist/query/Staff.js +2 -75
  36. package/dist/apis/anilist/query/User.js +8 -546
  37. package/dist/apis/anilist/query/Viewer.js +35 -0
  38. package/package.json +3 -2
  39. package/.eslintignore +0 -1
  40. package/.github/workflows/code_quality.yml +0 -32
  41. package/.github/workflows/codeql.yml +0 -33
  42. package/.github/workflows/test.yml +0 -30
  43. package/__tests__/anilist.test.ts +0 -268
  44. package/babel.config.js +0 -6
  45. package/jest.config.js +0 -11
  46. package/src/AniLink.ts +0 -80
  47. package/src/apis/anilist/interfaces/ActivityHistory.ts +0 -5
  48. package/src/apis/anilist/interfaces/CoverImage.ts +0 -6
  49. package/src/apis/anilist/interfaces/Distribution.ts +0 -4
  50. package/src/apis/anilist/interfaces/ExternalLink.ts +0 -5
  51. package/src/apis/anilist/interfaces/Favoured.ts +0 -15
  52. package/src/apis/anilist/interfaces/FuzzyDate.ts +0 -5
  53. package/src/apis/anilist/interfaces/Image.ts +0 -4
  54. package/src/apis/anilist/interfaces/ListScores.ts +0 -4
  55. package/src/apis/anilist/interfaces/Media.ts +0 -59
  56. package/src/apis/anilist/interfaces/MediaListEntry.ts +0 -4
  57. package/src/apis/anilist/interfaces/MediaStatistics.ts +0 -23
  58. package/src/apis/anilist/interfaces/MediaStats.ts +0 -7
  59. package/src/apis/anilist/interfaces/Name.ts +0 -8
  60. package/src/apis/anilist/interfaces/NextAiringEpisode.ts +0 -5
  61. package/src/apis/anilist/interfaces/Ranking.ts +0 -10
  62. package/src/apis/anilist/interfaces/ScoreDistribution.ts +0 -4
  63. package/src/apis/anilist/interfaces/Staff.ts +0 -6
  64. package/src/apis/anilist/interfaces/Stat.ts +0 -24
  65. package/src/apis/anilist/interfaces/Statistics.ts +0 -6
  66. package/src/apis/anilist/interfaces/StatusDistribution.ts +0 -4
  67. package/src/apis/anilist/interfaces/StreamingEpisode.ts +0 -6
  68. package/src/apis/anilist/interfaces/Studio.ts +0 -4
  69. package/src/apis/anilist/interfaces/Tag.ts +0 -10
  70. package/src/apis/anilist/interfaces/Title.ts +0 -6
  71. package/src/apis/anilist/interfaces/Trailer.ts +0 -5
  72. package/src/apis/anilist/interfaces/UserStats.ts +0 -25
  73. package/src/apis/anilist/interfaces/responses/AiringSchedule.ts +0 -10
  74. package/src/apis/anilist/interfaces/responses/Character.ts +0 -26
  75. package/src/apis/anilist/interfaces/responses/Media.ts +0 -118
  76. package/src/apis/anilist/interfaces/responses/MediaList.ts +0 -24
  77. package/src/apis/anilist/interfaces/responses/MediaListCollectionResponse.ts +0 -37
  78. package/src/apis/anilist/interfaces/responses/MediaTrend.ts +0 -13
  79. package/src/apis/anilist/interfaces/responses/Staff.ts +0 -53
  80. package/src/apis/anilist/interfaces/responses/User.ts +0 -72
  81. package/src/apis/anilist/mutation/UpdateUser.ts +0 -162
  82. package/src/apis/anilist/query/AiringSchedule.ts +0 -160
  83. package/src/apis/anilist/query/Character.ts +0 -75
  84. package/src/apis/anilist/query/Media.ts +0 -295
  85. package/src/apis/anilist/query/MediaList.ts +0 -192
  86. package/src/apis/anilist/query/MediaListCollection.ts +0 -673
  87. package/src/apis/anilist/query/MediaTrend.ts +0 -169
  88. package/src/apis/anilist/query/Staff.ts +0 -122
  89. package/src/apis/anilist/query/User.ts +0 -567
  90. package/src/base/APIWrapper.ts +0 -7
  91. package/src/base/RequestHandler.ts +0 -21
  92. package/tsconfig.json +0 -15
@@ -1,2 +1,362 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserSchema = void 0;
4
+ const Image_1 = require("../Image");
5
+ const UserStats_1 = require("../UserStats");
6
+ const Title_1 = require("../Title");
7
+ const Name_1 = require("../Name");
8
+ const CoverImage_1 = require("../CoverImage");
9
+ const Tag_1 = require("../Tag");
10
+ exports.UserSchema = `
11
+ id
12
+ name
13
+ about(asHtml: $asHtml)
14
+ avatar {
15
+ large
16
+ medium
17
+ }
18
+ bannerImage
19
+ isFollowing
20
+ isFollower
21
+ isBlocked
22
+ bans
23
+ options {
24
+ titleLanguage
25
+ displayAdultContent
26
+ airingNotifications
27
+ profileColor
28
+ notificationOptions {
29
+ type
30
+ enabled
31
+ }
32
+ timezone
33
+ activityMergeTime
34
+ staffNameLanguage
35
+ restrictMessagesToFollowing
36
+ disabledListActivity {
37
+ disabled
38
+ type
39
+ }
40
+ }
41
+ mediaListOptions {
42
+ scoreFormat
43
+ rowOrder
44
+ animeList {
45
+ sectionOrder
46
+ splitCompletedSectionByFormat
47
+ customLists
48
+ advancedScoring
49
+ advancedScoringEnabled
50
+ }
51
+ mangaList {
52
+ sectionOrder
53
+ splitCompletedSectionByFormat
54
+ customLists
55
+ advancedScoring
56
+ advancedScoringEnabled
57
+ }
58
+ }
59
+ favourites {
60
+ anime (perPage: 50) {
61
+ edges {
62
+ node {
63
+ id
64
+ ${Title_1.TitleSchema}
65
+ }
66
+ }
67
+ nodes {
68
+ id
69
+ ${Title_1.TitleSchema}
70
+ }
71
+ }
72
+ manga (perPage: 50) {
73
+ edges {
74
+ node {
75
+ id
76
+ ${Title_1.TitleSchema}
77
+ }
78
+ }
79
+ nodes {
80
+ id
81
+ ${Title_1.TitleSchema}
82
+ }
83
+ }
84
+ characters (perPage: 50) {
85
+ edges {
86
+ id
87
+ role
88
+ name
89
+ voiceActors {
90
+ id
91
+ ${Name_1.NameSchema}
92
+ ${Image_1.ImageSchema}
93
+ }
94
+ media {
95
+ id
96
+ ${Title_1.TitleSchema}
97
+ ${CoverImage_1.CoverImageSchema}
98
+ }
99
+ favouriteOrder
100
+ node {
101
+ id
102
+ ${Name_1.NameSchema}
103
+ ${Image_1.ImageSchema}
104
+ }
105
+ }
106
+ }
107
+ staff (perPage: 50) {
108
+ edges {
109
+ id
110
+ role
111
+ favouriteOrder
112
+ node {
113
+ id
114
+ ${Name_1.NameSchema}
115
+ ${Image_1.ImageSchema}
116
+ }
117
+ }
118
+ }
119
+ studios (perPage: 50) {
120
+ edges {
121
+ id
122
+ isMain
123
+ favouriteOrder
124
+ node {
125
+ id
126
+ name
127
+ isAnimationStudio
128
+ siteUrl
129
+ }
130
+ }
131
+ }
132
+ }
133
+ statistics {
134
+ anime {
135
+ count
136
+ meanScore
137
+ standardDeviation
138
+ minutesWatched
139
+ episodesWatched
140
+ formats (limit: $animeStatLimit, sort: $animeStatSort) {
141
+ ${UserStats_1.UserAnimeStatsSchema}
142
+ format
143
+ }
144
+ statuses (limit: $animeStatLimit, sort: $animeStatSort) {
145
+ ${UserStats_1.UserAnimeStatsSchema}
146
+ status
147
+ }
148
+ scores (limit: $animeStatLimit, sort: $animeStatSort) {
149
+ ${UserStats_1.UserAnimeStatsSchema}
150
+ score
151
+ }
152
+ lengths (limit: $animeStatLimit, sort: $animeStatSort) {
153
+ ${UserStats_1.UserAnimeStatsSchema}
154
+ length
155
+ }
156
+ releaseYears (limit: $animeStatLimit, sort: $animeStatSort) {
157
+ ${UserStats_1.UserAnimeStatsSchema}
158
+ releaseYear
159
+ }
160
+ startYears (limit: $animeStatLimit, sort: $animeStatSort) {
161
+ ${UserStats_1.UserAnimeStatsSchema}
162
+ startYear
163
+ }
164
+ genres (limit: $animeStatLimit, sort: $animeStatSort) {
165
+ ${UserStats_1.UserAnimeStatsSchema}
166
+ genre
167
+ }
168
+ tags (limit: $animeStatLimit, sort: $animeStatSort) {
169
+ ${UserStats_1.UserAnimeStatsSchema}
170
+ tag {
171
+ ${Tag_1.TagSchema}
172
+ }
173
+ }
174
+ countries (limit: $animeStatLimit, sort: $animeStatSort) {
175
+ ${UserStats_1.UserAnimeStatsSchema}
176
+ country
177
+ }
178
+ voiceActors (limit: $animeStatLimit, sort: $animeStatSort) {
179
+ ${UserStats_1.UserAnimeStatsSchema}
180
+ voiceActor {
181
+ id
182
+ ${Name_1.NameSchema}
183
+ }
184
+ characterIds
185
+ }
186
+ staff (limit: $animeStatLimit, sort: $animeStatSort) {
187
+ ${UserStats_1.UserAnimeStatsSchema}
188
+ staff {
189
+ id
190
+ ${Name_1.NameSchema}
191
+ }
192
+ }
193
+ studios (limit: $animeStatLimit, sort: $animeStatSort) {
194
+ ${UserStats_1.UserAnimeStatsSchema}
195
+ studio {
196
+ id
197
+ name
198
+ }
199
+ }
200
+ }
201
+ manga {
202
+ count
203
+ meanScore
204
+ standardDeviation
205
+ chaptersRead
206
+ volumesRead
207
+ formats (limit: $mangaStatLimit, sort: $mangaStatSort) {
208
+ ${UserStats_1.UserMangaStatsSchema}
209
+ format
210
+ }
211
+ statuses (limit: $mangaStatLimit, sort: $mangaStatSort) {
212
+ ${UserStats_1.UserMangaStatsSchema}
213
+ status
214
+ }
215
+ scores (limit: $mangaStatLimit, sort: $mangaStatSort) {
216
+ ${UserStats_1.UserMangaStatsSchema}
217
+ score
218
+ }
219
+ lengths (limit: $mangaStatLimit, sort: $mangaStatSort) {
220
+ ${UserStats_1.UserMangaStatsSchema}
221
+ length
222
+ }
223
+ releaseYears (limit: $mangaStatLimit, sort: $mangaStatSort) {
224
+ ${UserStats_1.UserMangaStatsSchema}
225
+ releaseYear
226
+ }
227
+ startYears (limit: $mangaStatLimit, sort: $mangaStatSort) {
228
+ ${UserStats_1.UserMangaStatsSchema}
229
+ startYear
230
+ }
231
+ genres (limit: $mangaStatLimit, sort: $mangaStatSort) {
232
+ ${UserStats_1.UserMangaStatsSchema}
233
+ genre
234
+ }
235
+ tags (limit: $mangaStatLimit, sort: $mangaStatSort) {
236
+ ${UserStats_1.UserMangaStatsSchema}
237
+ tag {
238
+ ${Tag_1.TagSchema}
239
+ }
240
+ }
241
+ countries (limit: $mangaStatLimit, sort: $mangaStatSort) {
242
+ ${UserStats_1.UserMangaStatsSchema}
243
+ country
244
+ }
245
+ staff (limit: $mangaStatLimit, sort: $mangaStatSort) {
246
+ ${UserStats_1.UserMangaStatsSchema}
247
+ staff {
248
+ id
249
+ ${Name_1.NameSchema}
250
+ }
251
+ }
252
+ studios (limit: $mangaStatLimit, sort: $mangaStatSort) {
253
+ ${UserStats_1.UserMangaStatsSchema}
254
+ studio {
255
+ id
256
+ name
257
+ }
258
+ }
259
+ }
260
+ }
261
+ stats {
262
+ watchedTime
263
+ chaptersRead
264
+ activityHistory {
265
+ date
266
+ amount
267
+ level
268
+ }
269
+ animeStatusDistribution {
270
+ status
271
+ amount
272
+ }
273
+ mangaStatusDistribution {
274
+ status
275
+ amount
276
+ }
277
+ animeScoreDistribution {
278
+ score
279
+ amount
280
+ }
281
+ mangaScoreDistribution {
282
+ score
283
+ amount
284
+ }
285
+ animeListScores {
286
+ meanScore
287
+ standardDeviation
288
+ }
289
+ mangaListScores {
290
+ meanScore
291
+ standardDeviation
292
+ }
293
+ favouredGenresOverview {
294
+ genre
295
+ amount
296
+ meanScore
297
+ timeWatched
298
+ }
299
+ favouredGenres {
300
+ genre
301
+ amount
302
+ meanScore
303
+ timeWatched
304
+ }
305
+ favouredTags {
306
+ tag {
307
+ ${Tag_1.TagSchema}
308
+ }
309
+ amount
310
+ meanScore
311
+ timeWatched
312
+ }
313
+ favouredActors {
314
+ staff {
315
+ id
316
+ ${Name_1.NameSchema}
317
+ }
318
+ amount
319
+ meanScore
320
+ timeWatched
321
+ }
322
+ favouredStaff {
323
+ staff {
324
+ id
325
+ ${Name_1.NameSchema}
326
+ }
327
+ amount
328
+ meanScore
329
+ timeWatched
330
+ }
331
+ favouredStudios {
332
+ studio {
333
+ id
334
+ name
335
+ }
336
+ amount
337
+ meanScore
338
+ timeWatched
339
+ }
340
+ favouredYears {
341
+ year
342
+ amount
343
+ meanScore
344
+ }
345
+ favouredFormats {
346
+ format
347
+ amount
348
+ }
349
+ }
350
+ unreadNotificationCount
351
+ siteUrl
352
+ donatorTier
353
+ donatorBadge
354
+ moderatorRoles
355
+ createdAt
356
+ updatedAt
357
+ previousNames {
358
+ name
359
+ createdAt
360
+ updatedAt
361
+ }
362
+ `;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AiringScheduleQuery = void 0;
13
13
  const APIWrapper_1 = require("../../../base/APIWrapper");
14
14
  const RequestHandler_1 = require("../../../base/RequestHandler");
15
+ const AiringSchedule_1 = require("../interfaces/responses/AiringSchedule");
15
16
  class AiringScheduleQuery extends APIWrapper_1.APIWrapper {
16
17
  constructor(authToken) {
17
18
  super('https://graphql.anilist.co');
@@ -20,122 +21,9 @@ class AiringScheduleQuery extends APIWrapper_1.APIWrapper {
20
21
  airingSchedule(variables) {
21
22
  return __awaiter(this, void 0, void 0, function* () {
22
23
  const query = `
23
- query ($id: Int, $mediaId: Int, $episode: Int, $airingAt: Int, $notYetAired: Boolean, $id_not: Int, $id_in: [Int], $id_not_in: [Int], $mediaId_not: Int, $mediaId_in: [Int], $mediaId_not_in: [Int], $episode_not: Int, $episode_in: [Int], $episode_not_in: [Int], $episode_greater: Int, $episode_lesser: Int, $airingAt_greater: Int, $airingAt_lesser: Int, $sort: [AiringSort]) {
24
+ query ($id: Int, $mediaId: Int, $episode: Int, $airingAt: Int, $notYetAired: Boolean, $id_not: Int, $id_in: [Int], $id_not_in: [Int], $mediaId_not: Int, $mediaId_in: [Int], $mediaId_not_in: [Int], $episode_not: Int, $episode_in: [Int], $episode_not_in: [Int], $episode_greater: Int, $episode_lesser: Int, $airingAt_greater: Int, $airingAt_lesser: Int, $sort: [AiringSort], $asHtml: Boolean) {
24
25
  AiringSchedule (id: $id, mediaId: $mediaId, episode: $episode, airingAt: $airingAt, notYetAired: $notYetAired, id_not: $id_not, id_in: $id_in, id_not_in: $id_not_in, mediaId_not: $mediaId_not, mediaId_in: $mediaId_in, mediaId_not_in: $mediaId_not_in, episode_not: $episode_not, episode_in: $episode_in, episode_not_in: $episode_not_in, episode_greater: $episode_greater, episode_lesser: $episode_lesser, airingAt_greater: $airingAt_greater, airingAt_lesser: $airingAt_lesser, sort: $sort) {
25
- id
26
- airingAt
27
- timeUntilAiring
28
- episode
29
- mediaId
30
- media {
31
- id
32
- idMal
33
- title {
34
- romaji
35
- english
36
- native
37
- userPreferred
38
- }
39
- type
40
- format
41
- status
42
- description
43
- startDate {
44
- year
45
- month
46
- day
47
- }
48
- endDate {
49
- year
50
- month
51
- day
52
- }
53
- season
54
- seasonYear
55
- seasonInt
56
- episodes
57
- duration
58
- countryOfOrigin
59
- isLicensed
60
- source
61
- hashtag
62
- trailer {
63
- id
64
- site
65
- thumbnail
66
- }
67
- updatedAt
68
- coverImage {
69
- extraLarge
70
- large
71
- medium
72
- color
73
- }
74
- bannerImage
75
- genres
76
- synonyms
77
- averageScore
78
- meanScore
79
- popularity
80
- isLocked
81
- trending
82
- favourites
83
- tags {
84
- id
85
- name
86
- description
87
- rank
88
- isGeneralSpoiler
89
- isMediaSpoiler
90
- isAdult
91
- }
92
- isFavourite
93
- isAdult
94
- nextAiringEpisode {
95
- airingAt
96
- timeUntilAiring
97
- episode
98
- }
99
- externalLinks {
100
- id
101
- url
102
- site
103
- }
104
- streamingEpisodes {
105
- title
106
- thumbnail
107
- url
108
- site
109
- }
110
- rankings {
111
- id
112
- rank
113
- type
114
- format
115
- year
116
- season
117
- allTime
118
- context
119
- }
120
- mediaListEntry {
121
- id
122
- status
123
- }
124
- stats {
125
- scoreDistribution {
126
- score
127
- amount
128
- }
129
- statusDistribution {
130
- status
131
- amount
132
- }
133
- }
134
- siteUrl
135
- autoCreateForumThread
136
- isRecommendationBlocked
137
- modNotes
138
- }
26
+ ${AiringSchedule_1.AiringScheduleSchema}
139
27
  }
140
28
  }
141
29
  `;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CharacterQuery = void 0;
13
13
  const APIWrapper_1 = require("../../../base/APIWrapper");
14
14
  const RequestHandler_1 = require("../../../base/RequestHandler");
15
+ const Character_1 = require("../interfaces/responses/Character");
15
16
  class CharacterQuery extends APIWrapper_1.APIWrapper {
16
17
  constructor(authToken) {
17
18
  super('https://graphql.anilist.co');
@@ -22,42 +23,7 @@ class CharacterQuery extends APIWrapper_1.APIWrapper {
22
23
  const query = `
23
24
  query ($id: Int, $isBirthday: Boolean, $search: String, $id_not: Int, $id_in: [Int], $id_not_in: [Int], $sort: [CharacterSort], $asHtml: Boolean, $mediaSort: [MediaSort], $mediaOnList: Boolean, $mediaPage: Int, $mediaPerPage: Int) {
24
25
  Character (id: $id, isBirthday: $isBirthday, search: $search, id_not: $id_not, id_in: $id_in, id_not_in: $id_not_in, sort: $sort) {
25
- id
26
- name {
27
- first
28
- last
29
- full
30
- native
31
- }
32
- image {
33
- large
34
- medium
35
- }
36
- description(asHtml: $asHtml)
37
- gender
38
- dateOfBirth {
39
- year
40
- month
41
- day
42
- }
43
- age
44
- bloodType
45
- isFavourite
46
- isFavouriteBlocked
47
- siteUrl
48
- media(sort: $mediaSort, onList: $mediaOnList, page: $mediaPage, perPage: $mediaPerPage) {
49
- nodes {
50
- id
51
- title {
52
- romaji
53
- english
54
- native
55
- userPreferred
56
- }
57
- }
58
- }
59
- favourites
60
- modNotes
26
+ ${Character_1.CharacterSchema}
61
27
  }
62
28
  }
63
29
  `;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GenreCollectionQuery = void 0;
13
+ const APIWrapper_1 = require("../../../base/APIWrapper");
14
+ const RequestHandler_1 = require("../../../base/RequestHandler");
15
+ class GenreCollectionQuery extends APIWrapper_1.APIWrapper {
16
+ constructor(authToken) {
17
+ super('https://graphql.anilist.co');
18
+ this.authToken = authToken;
19
+ }
20
+ genreCollection() {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const query = `
23
+ query {
24
+ GenreCollection
25
+ }
26
+ `;
27
+ const data = { query };
28
+ return yield (0, RequestHandler_1.sendRequest)(this.baseURL, 'POST', data, this.authToken);
29
+ });
30
+ }
31
+ }
32
+ exports.GenreCollectionQuery = GenreCollectionQuery;