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,25 +0,0 @@
1
- import { ActivityHistory } from './ActivityHistory'
2
- import { Distribution } from './Distribution'
3
- import { ScoreDistribution } from './ScoreDistribution'
4
- import { ListScores } from './ListScores'
5
- import { Favoured } from './Favoured'
6
-
7
- export interface UserStats {
8
- watchedTime: number
9
- chaptersRead: number
10
- activityHistory: ActivityHistory[]
11
- animeStatusDistribution: Distribution[]
12
- mangaStatusDistribution: Distribution[]
13
- animeScoreDistribution: ScoreDistribution[]
14
- mangaScoreDistribution: ScoreDistribution[]
15
- animeListScores: ListScores
16
- mangaListScores: ListScores
17
- favouredGenresOverview: Favoured[]
18
- favouredGenres: Favoured[]
19
- favouredTags: Favoured[]
20
- favouredActors: Favoured[]
21
- favouredStaff: Favoured[]
22
- favouredStudios: Favoured[]
23
- favouredYears: Favoured[]
24
- favouredFormats: Favoured[]
25
- }
@@ -1,10 +0,0 @@
1
- import { Media } from '../Media'
2
-
3
- export interface AiringScheduleResponse {
4
- id: number
5
- airingAt: number
6
- timeUntilAiring: number
7
- episode: number
8
- mediaId: number
9
- media: Media
10
- }
@@ -1,26 +0,0 @@
1
- import { FuzzyDate } from '../FuzzyDate'
2
- import { Name } from '../Name'
3
- import { Image } from '../Image'
4
- import { Title } from '../Title'
5
-
6
- export interface CharacterResponse {
7
- id: number
8
- name: Name
9
- image: Image
10
- description: string
11
- gender: string
12
- dateOfBirth: FuzzyDate
13
- age: string
14
- bloodType: string
15
- isFavourite: boolean
16
- isFavouriteBlocked: boolean
17
- siteUrl: string
18
- media: {
19
- nodes: Array<{
20
- id: number
21
- title: Title
22
- }>
23
- }
24
- favourites: number
25
- modNotes: string
26
- }
@@ -1,118 +0,0 @@
1
- import { Title } from '../Title'
2
- import { FuzzyDate } from '../FuzzyDate'
3
- import { Trailer } from '../Trailer'
4
- import { CoverImage } from '../CoverImage'
5
- import { Tag } from '../Tag'
6
- import { NextAiringEpisode } from '../NextAiringEpisode'
7
- import { ExternalLink } from '../ExternalLink'
8
- import { StreamingEpisode } from '../StreamingEpisode'
9
- import { Ranking } from '../Ranking'
10
- import { MediaStats } from '../MediaStats'
11
- import { MediaListEntry } from '../MediaListEntry'
12
- import { Name } from '../Name'
13
- import { Image } from '../Image'
14
-
15
- export interface MediaResponse {
16
- id: number
17
- idMal: number
18
- title: Title
19
- type: string
20
- format: string
21
- status: string
22
- description: string
23
- startDate: FuzzyDate
24
- endDate: FuzzyDate
25
- season: string
26
- seasonYear: number
27
- seasonInt: number
28
- episodes?: number
29
- duration?: number
30
- chapters?: number
31
- volumes?: number
32
- countryOfOrigin: string
33
- isLicensed: boolean
34
- source: string
35
- hashtag: string
36
- trailer: Trailer
37
- updatedAt: number
38
- coverImage: CoverImage
39
- bannerImage: string
40
- genres: string[]
41
- synonyms: string[]
42
- averageScore: number
43
- meanScore: number
44
- popularity: number
45
- isLocked: boolean
46
- trending: number
47
- favourites: number
48
- tags: Tag[]
49
- relations: {
50
- edges: Array<{
51
- relationType: string
52
- node: {
53
- id: number
54
- title: Title
55
- }
56
- }>
57
- }
58
- characters: {
59
- edges: Array<{
60
- id: number
61
- role: string
62
- name: string
63
- voiceActors: Array<{
64
- id: number
65
- name: Name
66
- image: Image
67
- }>
68
- media: {
69
- id: number
70
- title: Title
71
- coverImage: CoverImage
72
- }
73
- favouriteOrder: number
74
- node: {
75
- id: number
76
- name: Name
77
- image: Image
78
- }
79
- }>
80
- }
81
- staff: {
82
- edges: Array<{
83
- id: number
84
- role: string
85
- favouriteOrder: number
86
- node: {
87
- id: number
88
- name: Name
89
- image: Image
90
- }
91
- }>
92
- }
93
- studios: {
94
- edges: Array<{
95
- id: number
96
- isMain: boolean
97
- favouriteOrder: number
98
- node: {
99
- id: number
100
- name: string
101
- isAnimationStudio: boolean
102
- siteUrl: string
103
- }
104
- }>
105
- }
106
- isFavourite: boolean
107
- isAdult: boolean
108
- nextAiringEpisode: NextAiringEpisode
109
- externalLinks: ExternalLink[]
110
- streamingEpisodes: StreamingEpisode[]
111
- rankings: Ranking[]
112
- mediaListEntry: MediaListEntry
113
- stats: MediaStats
114
- siteUrl: string
115
- autoCreateForumThread: boolean
116
- isRecommendationBlocked: boolean
117
- modNotes: string
118
- }
@@ -1,24 +0,0 @@
1
- import { Media } from '../Media'
2
-
3
- export interface MediaListResponse {
4
- id: number
5
- userId: number
6
- mediaId: number
7
- status: string
8
- score: number
9
- progress: number
10
- progressVolumes: number
11
- repeat: number
12
- priority: number
13
- private: boolean
14
- notes: string
15
- hiddenFromStatusLists: boolean
16
- customLists: any
17
- advancedScores: any
18
- startedAt: any
19
- completedAt: any
20
- updatedAt: number
21
- createdAt: number
22
- media: Media
23
- user: any
24
- }
@@ -1,37 +0,0 @@
1
- import { FuzzyDate } from '../FuzzyDate'
2
- import { Media } from '../Media'
3
- import { UserResponse } from './User'
4
-
5
- export interface MediaListCollectionResponse {
6
- MediaListCollection: {
7
- lists: Array<{
8
- entries: Array<{
9
- id: number
10
- userId: number
11
- mediaId: number
12
- status: string
13
- score: number
14
- progress: number
15
- progressVolumes: number
16
- repeat: number
17
- priority: number
18
- private: boolean
19
- notes: string
20
- hiddenFromStatusLists: boolean
21
- customLists: boolean[]
22
- advancedScores: number[]
23
- startedAt: FuzzyDate
24
- completedAt: FuzzyDate
25
- updatedAt: number
26
- createdAt: number
27
- media: Media
28
- }>
29
- name: string
30
- isCustomList: boolean
31
- isSplitCompletedList: boolean
32
- status: string
33
- }>
34
- user: UserResponse
35
- hasNextChunk: boolean
36
- }
37
- }
@@ -1,13 +0,0 @@
1
- import { Media } from '../Media'
2
-
3
- export interface MediaTrendResponse {
4
- mediaId: number
5
- date: number
6
- trending: number
7
- averageScore: number
8
- popularity: number
9
- inProgress: number
10
- releasing: boolean
11
- episode: number
12
- media: Media
13
- }
@@ -1,53 +0,0 @@
1
- import { Name } from '../Name'
2
- import { Image } from '../Image'
3
- import { FuzzyDate } from '../FuzzyDate'
4
- import { Title } from '../Title'
5
-
6
- export interface StaffResponse {
7
- id: number
8
- name: Name
9
- languageV2: string
10
- image: Image
11
- description: string
12
- primaryOccupations: string[]
13
- gender: string
14
- dateOfBirth: FuzzyDate
15
- dateOfDeath: FuzzyDate
16
- age: number
17
- yearsActive: number[]
18
- homeTown: string
19
- bloodType: string
20
- isFavourite: boolean
21
- isFavouriteBlocked: boolean
22
- siteUrl: string
23
- staffMedia: {
24
- nodes: Array<{
25
- id: number
26
- title: Title
27
- }>
28
- }
29
- characters: {
30
- nodes: Array<{
31
- id: number
32
- name: Name
33
- }>
34
- }
35
- characterMedia: {
36
- nodes: Array<{
37
- id: number
38
- title: Title
39
- }>
40
- }
41
- staff: {
42
- id: number
43
- name: Name
44
- }
45
- submitter: {
46
- id: number
47
- name: string
48
- }
49
- submissionStatus: number
50
- submissionNotes: string
51
- favourites: number
52
- modNotes: string
53
- }
@@ -1,72 +0,0 @@
1
- import { Image } from '../Image'
2
- import { Statistics } from '../Statistics'
3
- import { UserStats } from '../UserStats'
4
-
5
- export interface UserResponse {
6
- id: number
7
- name: string
8
- about: string
9
- avatar: Image
10
- bannerImage: string
11
- isFollowing: boolean
12
- isFollower: boolean
13
- isBlocked: boolean
14
- bans: any[]
15
- options: {
16
- titleLanguage: string
17
- displayAdultContent: boolean
18
- airingNotifications: boolean
19
- profileColor: string
20
- notificationOptions: Array<{
21
- type: string
22
- enabled: boolean
23
- }>
24
- timezone: string
25
- activityMergeTime: number
26
- staffNameLanguage: string
27
- restrictMessagesToFollowing: boolean
28
- disabledListActivity: Array<{
29
- disabled: boolean
30
- type: string
31
- }>
32
- }
33
- mediaListOptions: {
34
- scoreFormat: string
35
- rowOrder: string
36
- animeList: {
37
- sectionOrder: string[]
38
- splitCompletedSectionByFormat: boolean
39
- customLists: string[]
40
- advancedScoring: string[]
41
- advancedScoringEnabled: boolean
42
- }
43
- mangaList: {
44
- sectionOrder: string[]
45
- splitCompletedSectionByFormat: boolean
46
- customLists: string[]
47
- advancedScoring: string[]
48
- advancedScoringEnabled: boolean
49
- }
50
- }
51
- favourites: {
52
- anime: any[]
53
- manga: any[]
54
- characters: any[]
55
- staff: any[]
56
- studios: any[]
57
- }
58
- statistics: Statistics
59
- stats: UserStats
60
- unreadNotificationCount: number
61
- siteUrl: string
62
- donatorTier: number
63
- donatorBadge: string
64
- moderatorRoles: string[]
65
- createdAt: number
66
- updatedAt: number
67
- previousNames: Array<{
68
- name: string
69
- createdAt: number
70
- updatedAt: number
71
- }>
72
- }
@@ -1,162 +0,0 @@
1
- import { APIWrapper } from '../../../base/APIWrapper'
2
- import { sendRequest } from '../../../base/RequestHandler'
3
-
4
- export type UserTitleLanguage =
5
- 'ROMAJI'
6
- | 'ENGLISH'
7
- | 'NATIVE'
8
- | 'ROMAJI_STYLISED'
9
- | 'ENGLISH_STYLISED'
10
- | 'NATIVE_STYLISED'
11
- export type ScoreFormat = 'POINT_100' | 'POINT_10_DECIMAL' | 'POINT_10' | 'POINT_5' | 'POINT_3'
12
- export type UserStaffNameLanguage =
13
- 'ROMAJI'
14
- | 'ENGLISH'
15
- | 'NATIVE'
16
- | 'ROMAJI_STYLISED'
17
- | 'ENGLISH_STYLISED'
18
- | 'NATIVE_STYLISED'
19
- export interface NotificationOptionInput { type: string, enabled: boolean }
20
- export interface MediaListOptionsInput { scoreFormat: ScoreFormat, rowOrder: string, animeList: any, mangaList: any }
21
- export type ListActivityOptionInput = 'ANIME_LIST' | 'MANGA_LIST'
22
-
23
- interface UpdateUserVariables {
24
- about?: string
25
- titleLanguage?: UserTitleLanguage
26
- displayAdultContent?: boolean
27
- airingNotifications?: boolean
28
- scoreFormat?: ScoreFormat
29
- rowOrder?: string
30
- profileColor?: string
31
- donatorBadge?: string
32
- notificationOptions?: NotificationOptionInput[]
33
- timezone?: string
34
- activityMergeTime?: number
35
- animeListOptions?: MediaListOptionsInput
36
- mangaListOptions?: MediaListOptionsInput
37
- staffNameLanguage?: UserStaffNameLanguage
38
- restrictMessagesToFollowing?: boolean
39
- disabledListActivity?: ListActivityOptionInput[]
40
- }
41
-
42
- interface UpdateUserResponse {
43
- id: number
44
- name: string
45
- about: string
46
- avatar: {
47
- large: string
48
- medium: string
49
- }
50
- bannerImage: string
51
- isFollowing: boolean
52
- isFollower: boolean
53
- isBlocked: boolean
54
- bans: any[]
55
- options: {
56
- titleLanguage: string
57
- displayAdultContent: boolean
58
- airingNotifications: boolean
59
- profileColor: string
60
- notificationOptions: Array<{
61
- type: string
62
- enabled: boolean
63
- }>
64
- timezone: string
65
- activityMergeTime: number
66
- staffNameLanguage: string
67
- restrictMessagesToFollowing: boolean
68
- }
69
- mediaListOptions: {
70
- scoreFormat: string
71
- rowOrder: string
72
- animeList: {
73
- sectionOrder: string[]
74
- customLists: string[]
75
- advancedScoring: string[]
76
- advancedScoringEnabled: boolean
77
- }
78
- mangaList: {
79
- sectionOrder: string[]
80
- customLists: string[]
81
- advancedScoring: string[]
82
- advancedScoringEnabled: boolean
83
- }
84
- }
85
- unreadNotificationCount: number
86
- siteUrl: string
87
- donatorTier: number
88
- donatorBadge: string
89
- moderatorRoles: string[]
90
- createdAt: number
91
- updatedAt: number
92
- }
93
-
94
- export class UpdateUserMutation extends APIWrapper {
95
- private readonly authToken: string
96
-
97
- constructor (authToken: string) {
98
- super('https://graphql.anilist.co')
99
- this.authToken = authToken
100
- }
101
-
102
- async updateUser (variables: UpdateUserVariables): Promise<UpdateUserResponse> {
103
- const mutation = `
104
- mutation ($about: String, $titleLanguage: UserTitleLanguage, $displayAdultContent: Boolean, $airingNotifications: Boolean, $scoreFormat: ScoreFormat, $rowOrder: String, $profileColor: String, $donatorBadge: String, $notificationOptions: [NotificationOptionInput], $timezone: String, $activityMergeTime: Int, $animeListOptions: MediaListOptionsInput, $mangaListOptions: MediaListOptionsInput, $staffNameLanguage: UserStaffNameLanguage, $restrictMessagesToFollowing: Boolean, $disabledListActivity: [ListActivityOptionInput]) {
105
- UpdateUser(about: $about, titleLanguage: $titleLanguage, displayAdultContent: $displayAdultContent, airingNotifications: $airingNotifications, scoreFormat: $scoreFormat, rowOrder: $rowOrder, profileColor: $profileColor, donatorBadge: $donatorBadge, notificationOptions: $notificationOptions, timezone: $timezone, activityMergeTime: $activityMergeTime, animeListOptions: $animeListOptions, mangaListOptions: $mangaListOptions, staffNameLanguage: $staffNameLanguage, restrictMessagesToFollowing: $restrictMessagesToFollowing, disabledListActivity: $disabledListActivity) {
106
- id
107
- name
108
- about
109
- avatar {
110
- large
111
- medium
112
- }
113
- bannerImage
114
- isFollowing
115
- isFollower
116
- isBlocked
117
- bans
118
- options {
119
- titleLanguage
120
- displayAdultContent
121
- airingNotifications
122
- profileColor
123
- notificationOptions {
124
- type
125
- enabled
126
- }
127
- timezone
128
- activityMergeTime
129
- staffNameLanguage
130
- restrictMessagesToFollowing
131
- }
132
- mediaListOptions {
133
- scoreFormat
134
- rowOrder
135
- animeList {
136
- sectionOrder
137
- customLists
138
- advancedScoring
139
- advancedScoringEnabled
140
- }
141
- mangaList {
142
- sectionOrder
143
- customLists
144
- advancedScoring
145
- advancedScoringEnabled
146
- }
147
- }
148
- unreadNotificationCount
149
- siteUrl
150
- donatorTier
151
- donatorBadge
152
- moderatorRoles
153
- createdAt
154
- updatedAt
155
- }
156
- }
157
- `
158
-
159
- const data = { query: mutation, variables }
160
- return await sendRequest(this.baseURL, 'POST', data, this.authToken)
161
- }
162
- }
@@ -1,160 +0,0 @@
1
- import { APIWrapper } from '../../../base/APIWrapper'
2
- import { sendRequest } from '../../../base/RequestHandler'
3
- import { AiringScheduleResponse } from '../interfaces/responses/AiringSchedule'
4
-
5
- interface AiringScheduleVariables {
6
- id?: number
7
- mediaId?: number
8
- episode?: number
9
- airingAt?: number
10
- notYetAired?: boolean
11
- id_not?: number
12
- id_in?: number[]
13
- id_not_in?: number[]
14
- mediaId_not?: number
15
- mediaId_in?: number[]
16
- mediaId_not_in?: number[]
17
- episode_not?: number
18
- episode_in?: number[]
19
- episode_not_in?: number[]
20
- episode_greater?: number
21
- episode_lesser?: number
22
- airingAt_greater?: number
23
- airingAt_lesser?: number
24
- sort?: string[]
25
- }
26
-
27
- export class AiringScheduleQuery extends APIWrapper {
28
- private readonly authToken: string
29
-
30
- constructor (authToken: string) {
31
- super('https://graphql.anilist.co')
32
- this.authToken = authToken
33
- }
34
-
35
- async airingSchedule (variables?: AiringScheduleVariables): Promise<AiringScheduleResponse> {
36
- const query = `
37
- 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]) {
38
- 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) {
39
- id
40
- airingAt
41
- timeUntilAiring
42
- episode
43
- mediaId
44
- media {
45
- id
46
- idMal
47
- title {
48
- romaji
49
- english
50
- native
51
- userPreferred
52
- }
53
- type
54
- format
55
- status
56
- description
57
- startDate {
58
- year
59
- month
60
- day
61
- }
62
- endDate {
63
- year
64
- month
65
- day
66
- }
67
- season
68
- seasonYear
69
- seasonInt
70
- episodes
71
- duration
72
- countryOfOrigin
73
- isLicensed
74
- source
75
- hashtag
76
- trailer {
77
- id
78
- site
79
- thumbnail
80
- }
81
- updatedAt
82
- coverImage {
83
- extraLarge
84
- large
85
- medium
86
- color
87
- }
88
- bannerImage
89
- genres
90
- synonyms
91
- averageScore
92
- meanScore
93
- popularity
94
- isLocked
95
- trending
96
- favourites
97
- tags {
98
- id
99
- name
100
- description
101
- rank
102
- isGeneralSpoiler
103
- isMediaSpoiler
104
- isAdult
105
- }
106
- isFavourite
107
- isAdult
108
- nextAiringEpisode {
109
- airingAt
110
- timeUntilAiring
111
- episode
112
- }
113
- externalLinks {
114
- id
115
- url
116
- site
117
- }
118
- streamingEpisodes {
119
- title
120
- thumbnail
121
- url
122
- site
123
- }
124
- rankings {
125
- id
126
- rank
127
- type
128
- format
129
- year
130
- season
131
- allTime
132
- context
133
- }
134
- mediaListEntry {
135
- id
136
- status
137
- }
138
- stats {
139
- scoreDistribution {
140
- score
141
- amount
142
- }
143
- statusDistribution {
144
- status
145
- amount
146
- }
147
- }
148
- siteUrl
149
- autoCreateForumThread
150
- isRecommendationBlocked
151
- modNotes
152
- }
153
- }
154
- }
155
- `
156
-
157
- const data = { query, variables }
158
- return await sendRequest(this.baseURL, 'POST', data, this.authToken)
159
- }
160
- }