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,30 +0,0 @@
1
- name: Run Jest Tests
2
-
3
- on:
4
- push:
5
- branches: ["master"]
6
- pull_request:
7
- branches: ["master"]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v4
15
-
16
- - name: Use Node.js
17
- uses: actions/setup-node@v4
18
- with:
19
- node-version: '21'
20
-
21
- - name: Install Dependencies
22
- run: npm ci
23
-
24
- - name: Build Project
25
- run: npm run build
26
-
27
- - name: Run Jest
28
- run: npm run test
29
- env:
30
- ANILIST_TOKEN: ${{ secrets.ANILIST_TOKEN }}
@@ -1,268 +0,0 @@
1
- require('dotenv').config()
2
- import AniLink from '../dist/AniLink.js'
3
- // import AniLink from '../src/AniLink'
4
-
5
- async function handleRateLimit(apiCall: () => Promise<any>, retryAfter = 60) {
6
- try {
7
- return await apiCall();
8
- } catch (error: any) {
9
- if (error.response && error.response.status === 429) {
10
- console.log('Rate limit exceeded, waiting for 1 minute before retrying...');
11
- await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
12
- console.log('Retrying...');
13
- return handleRateLimit(apiCall, retryAfter);
14
- } else {
15
- throw error;
16
- }
17
- }
18
- }
19
-
20
- describe('Anilist API Query', () => {
21
- let aniLink: AniLink
22
-
23
- beforeAll(() => {
24
- const token = process.env.ANILIST_TOKEN
25
- aniLink = new AniLink(token)
26
- })
27
-
28
- test('user query', async () => {
29
- try {
30
- const response = await handleRateLimit(() => aniLink.anilist.query.user({ id: 542244, isHTML: true }))
31
- console.log(response)
32
- expect(response).toBeDefined()
33
- } catch (error: any) {
34
- if (error.response.data) {
35
- throw error.response.data
36
- } else {
37
- throw error.response
38
- }
39
- }
40
- })
41
-
42
- test('user query should handle errors', async () => {
43
- try {
44
- await handleRateLimit(() => aniLink.anilist.query.user({ id: 'invalid', isHTML: false }))
45
- } catch (error: any) {
46
- expect(error).toBeDefined()
47
- }
48
- })
49
-
50
- test('media query', async () => {
51
- try {
52
- const response = await handleRateLimit(() => aniLink.anilist.query.media({ id: 1, type: 'ANIME' }))
53
- console.log(response)
54
- expect(response).toBeDefined()
55
- } catch (error: any) {
56
- if (error.response.data) {
57
- throw error.response.data
58
- } else {
59
- throw error.response
60
- }
61
- }
62
- })
63
-
64
- test('media query should handle errors', async () => {
65
- try {
66
- await handleRateLimit(() => aniLink.anilist.query.media({ id: 'invalid', type: 'ANIME' }))
67
- } catch (error: any) {
68
- expect(error).toBeDefined()
69
- }
70
- })
71
-
72
- test('media trend query', async () => {
73
- try {
74
- const response = await handleRateLimit(() => aniLink.anilist.query.mediaTrend({ mediaId: 1, type: 'ANIME' }))
75
- console.log(response)
76
- expect(response).toBeDefined()
77
- } catch (error: any) {
78
- if (error.response.data) {
79
- throw error.response.data
80
- } else {
81
- throw error.response
82
- }
83
- }
84
- })
85
-
86
- test('media trend query should handle errors', async () => {
87
- try {
88
- await handleRateLimit(() => aniLink.anilist.query.mediaTrend({ mediaId: 'invalid', type: 'ANIME' }))
89
- } catch (error: any) {
90
- expect(error).toBeDefined()
91
- }
92
- })
93
-
94
- test('airing schedule query should return a response', async () => {
95
- try {
96
- const response = await handleRateLimit(() => aniLink.anilist.query.airingSchedule({ mediaId: 130590 })) // id needs to be an airing anime
97
- console.log(response)
98
- expect(response).toBeDefined()
99
- } catch (error: any) {
100
- if (error.response.data) {
101
- throw error.response.data
102
- } else {
103
- throw error.response
104
- }
105
- }
106
- })
107
-
108
- test('airing schedule query should handle errors', async () => {
109
- try {
110
- await handleRateLimit(() => aniLink.anilist.query.airingSchedule({ mediaId: 'invalid' }))
111
- } catch (error) {
112
- expect(error).toBeDefined()
113
- }
114
- })
115
-
116
- test('character query should return a response', async () => {
117
- try {
118
- const response = await handleRateLimit(() => aniLink.anilist.query.character({ id: 1, asHtml: true, mediaSort: ['POPULARITY_DESC'], mediaType: 'ANIME', mediaOnList: true, mediaPage: 1, mediaPerPage: 10 }))
119
- console.log(response)
120
- expect(response).toBeDefined()
121
- } catch (error: any) {
122
- if (error.response.data) {
123
- throw error.response.data
124
- } else {
125
- throw error.response
126
- }
127
- }
128
- })
129
-
130
- test('character query should handle errors', async () => {
131
- try {
132
- await handleRateLimit(() => aniLink.anilist.query.character({ id: 'invalid', asHtml: true, mediaSort: ['POPULARITY_DESC'], mediaOnList: true, mediaPage: 1, mediaPerPage: 10 }))
133
- } catch (error) {
134
- expect(error).toBeDefined()
135
- }
136
- })
137
-
138
- test('staff query should return a response', async () => {
139
- try {
140
- const response = await handleRateLimit(() => aniLink.anilist.query.staff({
141
- id: 132186,
142
- asHtml: true,
143
- staffMediaSort: ['POPULARITY_DESC'],
144
- staffMediaType: 'ANIME',
145
- staffMediaOnList: true,
146
- staffMediaPage: 1,
147
- staffMediaPerPage: 10,
148
- charactersSort: ['ID'],
149
- charactersPage: 1,
150
- charactersPerPage: 10,
151
- characterMediaSort: ['POPULARITY_DESC'],
152
- characterMediaOnList: true,
153
- characterMediaPage: 1,
154
- characterMediaPerPage: 10
155
- }))
156
- console.log(response)
157
- expect(response).toBeDefined()
158
- } catch (error: any) {
159
- if (error.response.data) {
160
- throw error.response.data
161
- } else {
162
- throw error.response
163
- }
164
- }
165
- })
166
-
167
- test('staff query should handle errors', async () => {
168
- try {
169
- await handleRateLimit(() => aniLink.anilist.query.staff({
170
- id: 'invalid'
171
- }))
172
- } catch (error) {
173
- expect(error).toBeDefined()
174
- }
175
- })
176
-
177
- test('media list query should return a response', async () => {
178
- try {
179
- const response = await handleRateLimit(() => aniLink.anilist.query.mediaList({ userId: 542244 }))
180
- console.log(response)
181
- expect(response).toBeDefined()
182
- } catch (error: any) {
183
- if (error.response.data) {
184
- throw error.response.data
185
- } else {
186
- throw error.response
187
- }
188
- }
189
- })
190
-
191
- test('media list query should handle errors', async () => {
192
- try {
193
- await handleRateLimit(() => aniLink.anilist.query.mediaList({ userId: 'invalid' }))
194
- } catch (error) {
195
- expect(error).toBeDefined()
196
- }
197
- })
198
-
199
- test('media list collection query should return a response', async () => {
200
- try {
201
- const response = await handleRateLimit(() => aniLink.anilist.query.mediaListCollection({
202
- userId: 542244,
203
- type: 'ANIME',
204
- status: 'COMPLETED',
205
- chunk: 1,
206
- perChunk: 10
207
- }))
208
- console.log(response)
209
- expect(response).toBeDefined()
210
- } catch (error: any) {
211
- if (error.response.data) {
212
- throw error.response.data
213
- } else {
214
- throw error.response
215
- }
216
- }
217
- })
218
-
219
- test('media list collection query should handle errors', async () => {
220
- try {
221
- await handleRateLimit(() => aniLink.anilist.query.mediaListCollection({
222
- userId: 'invalid'
223
- }))
224
- } catch (error) {
225
- expect(error).toBeDefined()
226
- }
227
- })
228
- })
229
-
230
- describe('Anilist API Mutation', () => {
231
- let aniLink: AniLink
232
-
233
- beforeAll(() => {
234
- const token = process.env.ANILIST_TOKEN
235
- aniLink = new AniLink(token)
236
- })
237
-
238
- test('update user', async () => {
239
- try {
240
- const response = await handleRateLimit(() => aniLink.anilist.mutation.updateUser({
241
- about: 'New about text',
242
- titleLanguage: 'ENGLISH',
243
- displayAdultContent: true,
244
- airingNotifications: true,
245
- scoreFormat: 'POINT_10',
246
- rowOrder: 'title',
247
- profileColor: 'blue',
248
- donatorBadge: 'Supporter',
249
- notificationOptions: [{ type: 'AIRING', enabled: true }],
250
- timezone: '-06:00',
251
- activityMergeTime: 30,
252
- animeListOptions: { sectionOrder: ['title'], customLists: [], advancedScoring: [], advancedScoringEnabled: false },
253
- mangaListOptions: { sectionOrder: ['title'], customLists: [], advancedScoring: [], advancedScoringEnabled: false },
254
- staffNameLanguage: 'ROMAJI',
255
- restrictMessagesToFollowing: false,
256
- disabledListActivity: [{ type: 'CURRENT', disabled: false }]
257
- }))
258
- console.log(response)
259
- expect(response).toBeDefined()
260
- } catch (error: any) {
261
- if (error.response.data) {
262
- throw error.response.data
263
- } else {
264
- throw error.response
265
- }
266
- }
267
- })
268
- })
package/babel.config.js DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- presets: [
3
- ['@babel/preset-env', { targets: { node: 'current' } }],
4
- '@babel/preset-typescript'
5
- ]
6
- }
package/jest.config.js DELETED
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- roots: ['<rootDir>/src', '<rootDir>/__tests__'],
3
- testMatch: [
4
- '**/__tests__/**/*.+(ts|tsx|js)',
5
- '**/?(*.)+(spec|test).+(ts|tsx|js)'
6
- ],
7
- transform: {
8
- '^.+\\.(ts|tsx)$': 'ts-jest'
9
- },
10
- testTimeout: 90000
11
- }
package/src/AniLink.ts DELETED
@@ -1,80 +0,0 @@
1
- import { UserQuery } from './apis/anilist/query/User'
2
- import { MediaQuery } from './apis/anilist/query/Media'
3
- import { MediaTrendQuery } from './apis/anilist/query/MediaTrend'
4
- import { AiringScheduleQuery } from './apis/anilist/query/AiringSchedule'
5
- import { CharacterQuery } from './apis/anilist/query/Character'
6
- import { MediaListQuery } from './apis/anilist/query/MediaList'
7
- import { StaffQuery } from './apis/anilist/query/Staff'
8
- import { MediaListCollectionQuery } from './apis/anilist/query/MediaListCollection'
9
- import {
10
- ListActivityOptionInput,
11
- MediaListOptionsInput,
12
- NotificationOptionInput,
13
- ScoreFormat,
14
- UpdateUserMutation,
15
- UserTitleLanguage
16
- } from './apis/anilist/mutation/UpdateUser'
17
-
18
- class AniLink {
19
- public anilist: {
20
- query: {
21
- user: () => Promise<any>
22
- media: () => Promise<any>
23
- mediaTrend: () => Promise<any>
24
- airingSchedule: () => Promise<any>
25
- character: () => Promise<any>
26
- staff: () => Promise<any>
27
- mediaList: () => Promise<any>
28
- mediaListCollection: () => Promise<any>
29
- }
30
- mutation: {
31
- updateUser: (variables: {
32
- about?: string
33
- titleLanguage?: UserTitleLanguage
34
- displayAdultContent?: boolean
35
- airingNotifications?: boolean
36
- scoreFormat?: ScoreFormat
37
- rowOrder?: string
38
- profileColor?: string
39
- donatorBadge?: string
40
- notificationOptions?: NotificationOptionInput[]
41
- timezone?: string
42
- activityMergeTime?: number
43
- animeListOptions?: MediaListOptionsInput
44
- mangaListOptions?: MediaListOptionsInput
45
- staffNameLanguage?: UserTitleLanguage
46
- restrictMessagesToFollowing?: boolean
47
- disabledListActivity?: ListActivityOptionInput[]
48
- }) => Promise<any>
49
- }
50
- }
51
-
52
- constructor (authToken: string) {
53
- const userQueryInstance = new UserQuery(authToken)
54
- const mediaQueryInstance = new MediaQuery(authToken)
55
- const mediaTrendQueryInstance = new MediaTrendQuery(authToken)
56
- const airingScheduleQueryInstance = new AiringScheduleQuery(authToken)
57
- const characterQueryInstance = new CharacterQuery(authToken)
58
- const staffQueryInstance = new StaffQuery(authToken)
59
- const mediaListQueryInstance = new MediaListQuery(authToken)
60
- const mediaListCollectionQueryInstance = new MediaListCollectionQuery(authToken)
61
- const updateUserMutationInstance = new UpdateUserMutation(authToken)
62
- this.anilist = {
63
- query: {
64
- user: userQueryInstance.user.bind(userQueryInstance),
65
- media: mediaQueryInstance.media.bind(mediaQueryInstance),
66
- mediaTrend: mediaTrendQueryInstance.mediaTrend.bind(mediaTrendQueryInstance),
67
- airingSchedule: airingScheduleQueryInstance.airingSchedule.bind(airingScheduleQueryInstance),
68
- character: characterQueryInstance.character.bind(characterQueryInstance),
69
- staff: staffQueryInstance.staff.bind(staffQueryInstance),
70
- mediaList: mediaListQueryInstance.mediaList.bind(mediaListQueryInstance),
71
- mediaListCollection: mediaListCollectionQueryInstance.mediaListCollection.bind(mediaListQueryInstance)
72
- },
73
- mutation: {
74
- updateUser: updateUserMutationInstance.updateUser.bind(updateUserMutationInstance)
75
- }
76
- }
77
- }
78
- }
79
-
80
- module.exports = AniLink
@@ -1,5 +0,0 @@
1
- export interface ActivityHistory {
2
- date: number
3
- amount: number
4
- level: number
5
- }
@@ -1,6 +0,0 @@
1
- export interface CoverImage {
2
- extraLarge: string
3
- large: string
4
- medium: string
5
- color: string
6
- }
@@ -1,4 +0,0 @@
1
- export interface Distribution {
2
- status: string
3
- amount: number
4
- }
@@ -1,5 +0,0 @@
1
- export interface ExternalLink {
2
- id: number
3
- url: string
4
- site: string
5
- }
@@ -1,15 +0,0 @@
1
- import { Tag } from './Tag'
2
- import { Staff } from './Staff'
3
- import { Studio } from './Studio'
4
-
5
- export interface Favoured {
6
- genre?: string
7
- amount: number
8
- meanScore: number
9
- timeWatched: number
10
- tag?: Tag
11
- staff?: Staff
12
- studio?: Studio
13
- year?: number
14
- format?: string
15
- }
@@ -1,5 +0,0 @@
1
- export interface FuzzyDate {
2
- year: number
3
- month: number
4
- day: number
5
- }
@@ -1,4 +0,0 @@
1
- export interface Image {
2
- large: string
3
- medium: string
4
- }
@@ -1,4 +0,0 @@
1
- export interface ListScores {
2
- meanScore: number
3
- standardDeviation: number
4
- }
@@ -1,59 +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
-
13
- export interface Media {
14
- id: number
15
- idMal: number
16
- title: Title
17
- type: string
18
- format: string
19
- status: string
20
- description: string
21
- startDate: FuzzyDate
22
- endDate: FuzzyDate
23
- season: string
24
- seasonYear: number
25
- seasonInt: number
26
- episodes?: number
27
- duration?: number
28
- chapters?: number
29
- volumes?: number
30
- countryOfOrigin: string
31
- isLicensed: boolean
32
- source: string
33
- hashtag: string
34
- trailer: Trailer
35
- updatedAt: number
36
- coverImage: CoverImage
37
- bannerImage: string
38
- genres: string[]
39
- synonyms: string[]
40
- averageScore: number
41
- meanScore: number
42
- popularity: number
43
- isLocked: boolean
44
- trending: number
45
- favourites: number
46
- tags: Tag[]
47
- isFavourite: boolean
48
- isAdult: boolean
49
- nextAiringEpisode: NextAiringEpisode
50
- externalLinks: ExternalLink[]
51
- streamingEpisodes: StreamingEpisode[]
52
- rankings: Ranking[]
53
- mediaListEntry: MediaListEntry
54
- stats: MediaStats
55
- siteUrl: string
56
- autoCreateForumThread: boolean
57
- isRecommendationBlocked: boolean
58
- modNotes: string
59
- }
@@ -1,4 +0,0 @@
1
- export interface MediaListEntry {
2
- id: number
3
- status: string
4
- }
@@ -1,23 +0,0 @@
1
- import { Stat } from './Stat'
2
-
3
- export interface MediaStatistics {
4
- count: number
5
- meanScore: number
6
- standardDeviation: number
7
- minutesWatched?: number
8
- episodesWatched?: number
9
- chaptersRead?: number
10
- volumesRead?: number
11
- formats: Stat[]
12
- statuses: Stat[]
13
- scores: Stat[]
14
- lengths: Stat[]
15
- releaseYears: Stat[]
16
- startYears: Stat[]
17
- genres: Stat[]
18
- tags: Stat[]
19
- countries: Stat[]
20
- voiceActors?: Stat[]
21
- staff: Stat[]
22
- studios: Stat[]
23
- }
@@ -1,7 +0,0 @@
1
- import { ScoreDistribution } from './ScoreDistribution'
2
- import { StatusDistribution } from './StatusDistribution'
3
-
4
- export interface MediaStats {
5
- scoreDistribution: ScoreDistribution[]
6
- statusDistribution: StatusDistribution[]
7
- }
@@ -1,8 +0,0 @@
1
- export interface Name {
2
- first: string
3
- last: string
4
- full: string
5
- native: string
6
- alternative: string
7
- userPreferred: string
8
- }
@@ -1,5 +0,0 @@
1
- export interface NextAiringEpisode {
2
- airingAt: number
3
- timeUntilAiring: number
4
- episode: number
5
- }
@@ -1,10 +0,0 @@
1
- export interface Ranking {
2
- id: number
3
- rank: number
4
- type: string
5
- format: string
6
- year: number
7
- season: string
8
- allTime: boolean
9
- context: string
10
- }
@@ -1,4 +0,0 @@
1
- export interface ScoreDistribution {
2
- score: number
3
- amount: number
4
- }
@@ -1,6 +0,0 @@
1
- import { Name } from './Name'
2
-
3
- export interface Staff {
4
- id: number
5
- name: Name
6
- }
@@ -1,24 +0,0 @@
1
- import { Tag } from './Tag'
2
- import { Staff } from './Staff'
3
- import { Studio } from './Studio'
4
-
5
- export interface Stat {
6
- count: number
7
- meanScore: number
8
- minutesWatched?: number
9
- chaptersRead?: number
10
- mediaIds: number[]
11
- format?: string
12
- status?: string
13
- score?: number
14
- length?: number
15
- releaseYear?: number
16
- startYear?: number
17
- genre?: string
18
- tag?: Tag
19
- country?: string
20
- voiceActor?: Staff
21
- characterIds?: number[]
22
- staff?: Staff
23
- studio?: Studio
24
- }
@@ -1,6 +0,0 @@
1
- import { MediaStatistics } from './MediaStatistics'
2
-
3
- export interface Statistics {
4
- anime: MediaStatistics
5
- manga: MediaStatistics
6
- }
@@ -1,4 +0,0 @@
1
- export interface StatusDistribution {
2
- status: string
3
- amount: number
4
- }
@@ -1,6 +0,0 @@
1
- export interface StreamingEpisode {
2
- title: string
3
- thumbnail: string
4
- url: string
5
- site: string
6
- }
@@ -1,4 +0,0 @@
1
- export interface Studio {
2
- id: number
3
- name: string
4
- }
@@ -1,10 +0,0 @@
1
- export interface Tag {
2
- id: number
3
- name: string
4
- description: string
5
- category: string
6
- rank: number
7
- isGeneralSpoiler: boolean
8
- isMediaSpoiler: boolean
9
- isAdult: boolean
10
- }
@@ -1,6 +0,0 @@
1
- export interface Title {
2
- romaji: string
3
- english: string
4
- native: string
5
- userPreferred: string
6
- }
@@ -1,5 +0,0 @@
1
- export interface Trailer {
2
- id: string
3
- site: string
4
- thumbnail: string
5
- }