anilink-api-wrapper 1.0.0 → 1.1.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.
- package/__tests__/anilist.test.ts +1 -1
- package/dist/apis/anilist/interfaces/CoverImage.js +9 -0
- package/dist/apis/anilist/interfaces/ExternalLink.js +8 -0
- package/dist/apis/anilist/interfaces/FuzzyDate.js +6 -0
- package/dist/apis/anilist/interfaces/Image.js +7 -0
- package/dist/apis/anilist/interfaces/MediaListEntry.js +7 -0
- package/dist/apis/anilist/interfaces/Name.js +9 -0
- package/dist/apis/anilist/interfaces/NextAiringEpisode.js +8 -0
- package/dist/apis/anilist/interfaces/Ranking.js +13 -0
- package/dist/apis/anilist/interfaces/ScoreDistribution.js +7 -0
- package/dist/apis/anilist/interfaces/StatusDistribution.js +7 -0
- package/dist/apis/anilist/interfaces/StreamingEpisode.js +9 -0
- package/dist/apis/anilist/interfaces/Tag.js +10 -0
- package/dist/apis/anilist/interfaces/Title.js +9 -0
- package/dist/apis/anilist/interfaces/Trailer.js +8 -0
- package/dist/apis/anilist/interfaces/UserStats.js +13 -0
- package/dist/apis/anilist/interfaces/responses/AiringSchedule.js +12 -0
- package/dist/apis/anilist/interfaces/responses/Character.js +28 -0
- package/dist/apis/anilist/interfaces/responses/Media.js +208 -0
- package/dist/apis/anilist/interfaces/responses/MediaList.js +30 -0
- package/dist/apis/anilist/interfaces/responses/MediaListCollectionResponse.js +39 -0
- package/dist/apis/anilist/interfaces/responses/MediaTrend.js +15 -0
- package/dist/apis/anilist/interfaces/responses/Staff.js +53 -0
- package/dist/apis/anilist/interfaces/responses/User.js +360 -0
- package/dist/apis/anilist/query/AiringSchedule.js +3 -115
- package/dist/apis/anilist/query/Character.js +2 -36
- package/dist/apis/anilist/query/Media.js +3 -200
- package/dist/apis/anilist/query/MediaList.js +2 -137
- package/dist/apis/anilist/query/MediaListCollection.js +2 -623
- package/dist/apis/anilist/query/MediaTrend.js +3 -117
- package/dist/apis/anilist/query/Staff.js +2 -75
- package/dist/apis/anilist/query/User.js +7 -532
- package/package.json +1 -1
- package/src/apis/anilist/interfaces/CoverImage.ts +10 -1
- package/src/apis/anilist/interfaces/ExternalLink.ts +9 -1
- package/src/apis/anilist/interfaces/FuzzyDate.ts +7 -1
- package/src/apis/anilist/interfaces/Image.ts +8 -1
- package/src/apis/anilist/interfaces/MediaListEntry.ts +8 -1
- package/src/apis/anilist/interfaces/Name.ts +9 -0
- package/src/apis/anilist/interfaces/NextAiringEpisode.ts +8 -0
- package/src/apis/anilist/interfaces/Ranking.ts +14 -1
- package/src/apis/anilist/interfaces/ScoreDistribution.ts +8 -1
- package/src/apis/anilist/interfaces/StatusDistribution.ts +8 -1
- package/src/apis/anilist/interfaces/StreamingEpisode.ts +10 -1
- package/src/apis/anilist/interfaces/Tag.ts +10 -0
- package/src/apis/anilist/interfaces/Title.ts +10 -1
- package/src/apis/anilist/interfaces/Trailer.ts +9 -1
- package/src/apis/anilist/interfaces/UserStats.ts +15 -1
- package/src/apis/anilist/interfaces/responses/AiringSchedule.ts +13 -1
- package/src/apis/anilist/interfaces/responses/Character.ts +29 -5
- package/src/apis/anilist/interfaces/responses/Media.ts +217 -13
- package/src/apis/anilist/interfaces/responses/MediaList.ts +31 -1
- package/src/apis/anilist/interfaces/responses/MediaListCollectionResponse.ts +40 -2
- package/src/apis/anilist/interfaces/responses/MediaTrend.ts +16 -1
- package/src/apis/anilist/interfaces/responses/Staff.ts +54 -5
- package/src/apis/anilist/interfaces/responses/User.ts +362 -2
- package/src/apis/anilist/query/AiringSchedule.ts +4 -116
- package/src/apis/anilist/query/Character.ts +2 -37
- package/src/apis/anilist/query/Media.ts +4 -201
- package/src/apis/anilist/query/MediaList.ts +2 -138
- package/src/apis/anilist/query/MediaListCollection.ts +4 -630
- package/src/apis/anilist/query/MediaTrend.ts +4 -119
- package/src/apis/anilist/query/Staff.ts +2 -76
- package/src/apis/anilist/query/User.ts +7 -533
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MediaTrendQuery = void 0;
|
|
13
13
|
const APIWrapper_1 = require("../../../base/APIWrapper");
|
|
14
14
|
const RequestHandler_1 = require("../../../base/RequestHandler");
|
|
15
|
+
const MediaTrend_1 = require("../interfaces/responses/MediaTrend");
|
|
15
16
|
class MediaTrendQuery extends APIWrapper_1.APIWrapper {
|
|
16
17
|
constructor(authToken) {
|
|
17
18
|
super('https://graphql.anilist.co');
|
|
@@ -20,124 +21,9 @@ class MediaTrendQuery extends APIWrapper_1.APIWrapper {
|
|
|
20
21
|
mediaTrend(variables) {
|
|
21
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
23
|
const query = `
|
|
23
|
-
query ($mediaId: Int, $date: Int, $trending: Int, $averageScore: Int, $popularity: Int, $episode: Int, $releasing: Boolean, $mediaId_not: Int, $mediaId_in: [Int], $mediaId_not_in: [Int], $date_greater: Int, $date_lesser: Int, $trending_greater: Int, $trending_lesser: Int, $trending_not: Int, $averageScore_greater: Int, $averageScore_lesser: Int, $averageScore_not: Int, $popularity_greater: Int, $popularity_lesser: Int, $popularity_not: Int, $episode_greater: Int, $episode_lesser: Int, $episode_not: Int, $sort: [MediaTrendSort]) {
|
|
24
|
+
query ($mediaId: Int, $date: Int, $trending: Int, $averageScore: Int, $popularity: Int, $episode: Int, $releasing: Boolean, $mediaId_not: Int, $mediaId_in: [Int], $mediaId_not_in: [Int], $date_greater: Int, $date_lesser: Int, $trending_greater: Int, $trending_lesser: Int, $trending_not: Int, $averageScore_greater: Int, $averageScore_lesser: Int, $averageScore_not: Int, $popularity_greater: Int, $popularity_lesser: Int, $popularity_not: Int, $episode_greater: Int, $episode_lesser: Int, $episode_not: Int, $sort: [MediaTrendSort], $asHtml: Boolean) {
|
|
24
25
|
MediaTrend (mediaId: $mediaId, date: $date, trending: $trending, averageScore: $averageScore, popularity: $popularity, episode: $episode, releasing: $releasing, mediaId_not: $mediaId_not, mediaId_in: $mediaId_in, mediaId_not_in: $mediaId_not_in, date_greater: $date_greater, date_lesser: $date_lesser, trending_greater: $trending_greater, trending_lesser: $trending_lesser, trending_not: $trending_not, averageScore_greater: $averageScore_greater, averageScore_lesser: $averageScore_lesser, averageScore_not: $averageScore_not, popularity_greater: $popularity_greater, popularity_lesser: $popularity_lesser, popularity_not: $popularity_not, episode_greater: $episode_greater, episode_lesser: $episode_lesser, episode_not: $episode_not, sort: $sort) {
|
|
25
|
-
|
|
26
|
-
date
|
|
27
|
-
trending
|
|
28
|
-
averageScore
|
|
29
|
-
popularity
|
|
30
|
-
inProgress
|
|
31
|
-
releasing
|
|
32
|
-
episode
|
|
33
|
-
media {
|
|
34
|
-
id
|
|
35
|
-
idMal
|
|
36
|
-
title {
|
|
37
|
-
romaji
|
|
38
|
-
english
|
|
39
|
-
native
|
|
40
|
-
userPreferred
|
|
41
|
-
}
|
|
42
|
-
type
|
|
43
|
-
format
|
|
44
|
-
status
|
|
45
|
-
description
|
|
46
|
-
startDate {
|
|
47
|
-
year
|
|
48
|
-
month
|
|
49
|
-
day
|
|
50
|
-
}
|
|
51
|
-
endDate {
|
|
52
|
-
year
|
|
53
|
-
month
|
|
54
|
-
day
|
|
55
|
-
}
|
|
56
|
-
season
|
|
57
|
-
seasonYear
|
|
58
|
-
seasonInt
|
|
59
|
-
${(variables === null || variables === void 0 ? void 0 : variables.type) === 'ANIME' ? 'episodes\nduration' : 'chapters\nvolumes'}
|
|
60
|
-
countryOfOrigin
|
|
61
|
-
isLicensed
|
|
62
|
-
source
|
|
63
|
-
hashtag
|
|
64
|
-
trailer {
|
|
65
|
-
id
|
|
66
|
-
site
|
|
67
|
-
thumbnail
|
|
68
|
-
}
|
|
69
|
-
updatedAt
|
|
70
|
-
coverImage {
|
|
71
|
-
extraLarge
|
|
72
|
-
large
|
|
73
|
-
medium
|
|
74
|
-
color
|
|
75
|
-
}
|
|
76
|
-
bannerImage
|
|
77
|
-
genres
|
|
78
|
-
synonyms
|
|
79
|
-
averageScore
|
|
80
|
-
meanScore
|
|
81
|
-
popularity
|
|
82
|
-
isLocked
|
|
83
|
-
trending
|
|
84
|
-
favourites
|
|
85
|
-
tags {
|
|
86
|
-
id
|
|
87
|
-
name
|
|
88
|
-
description
|
|
89
|
-
rank
|
|
90
|
-
isGeneralSpoiler
|
|
91
|
-
isMediaSpoiler
|
|
92
|
-
isAdult
|
|
93
|
-
}
|
|
94
|
-
isFavourite
|
|
95
|
-
isAdult
|
|
96
|
-
nextAiringEpisode {
|
|
97
|
-
airingAt
|
|
98
|
-
timeUntilAiring
|
|
99
|
-
episode
|
|
100
|
-
}
|
|
101
|
-
externalLinks {
|
|
102
|
-
id
|
|
103
|
-
url
|
|
104
|
-
site
|
|
105
|
-
}
|
|
106
|
-
streamingEpisodes {
|
|
107
|
-
title
|
|
108
|
-
thumbnail
|
|
109
|
-
url
|
|
110
|
-
site
|
|
111
|
-
}
|
|
112
|
-
rankings {
|
|
113
|
-
id
|
|
114
|
-
rank
|
|
115
|
-
type
|
|
116
|
-
format
|
|
117
|
-
year
|
|
118
|
-
season
|
|
119
|
-
allTime
|
|
120
|
-
context
|
|
121
|
-
}
|
|
122
|
-
mediaListEntry {
|
|
123
|
-
id
|
|
124
|
-
status
|
|
125
|
-
}
|
|
126
|
-
stats {
|
|
127
|
-
scoreDistribution {
|
|
128
|
-
score
|
|
129
|
-
amount
|
|
130
|
-
}
|
|
131
|
-
statusDistribution {
|
|
132
|
-
status
|
|
133
|
-
amount
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
siteUrl
|
|
137
|
-
autoCreateForumThread
|
|
138
|
-
isRecommendationBlocked
|
|
139
|
-
modNotes
|
|
140
|
-
}
|
|
26
|
+
${MediaTrend_1.MediaTrendSchema}
|
|
141
27
|
}
|
|
142
28
|
}
|
|
143
29
|
`;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.StaffQuery = void 0;
|
|
13
13
|
const APIWrapper_1 = require("../../../base/APIWrapper");
|
|
14
14
|
const RequestHandler_1 = require("../../../base/RequestHandler");
|
|
15
|
+
const Staff_1 = require("../interfaces/responses/Staff");
|
|
15
16
|
class StaffQuery extends APIWrapper_1.APIWrapper {
|
|
16
17
|
constructor(authToken) {
|
|
17
18
|
super('https://graphql.anilist.co');
|
|
@@ -22,81 +23,7 @@ class StaffQuery 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: [StaffSort], $asHtml: Boolean, $staffMediaSort: [MediaSort], $staffMediaType: MediaType, $staffMediaOnList: Boolean, $staffMediaPage: Int, $staffMediaPerPage: Int, $charactersSort: [CharacterSort], $charactersPage: Int, $charactersPerPage: Int, $characterMediaSort: [MediaSort], $characterMediaOnList: Boolean, $characterMediaPage: Int, $characterMediaPerPage: Int) {
|
|
24
25
|
Staff (id: $id, isBirthday: $isBirthday, search: $search, id_not: $id_not, id_in: $id_in, id_not_in: $id_not_in, sort: $sort) {
|
|
25
|
-
|
|
26
|
-
name {
|
|
27
|
-
first
|
|
28
|
-
last
|
|
29
|
-
full
|
|
30
|
-
native
|
|
31
|
-
alternative
|
|
32
|
-
userPreferred
|
|
33
|
-
}
|
|
34
|
-
languageV2
|
|
35
|
-
image {
|
|
36
|
-
large
|
|
37
|
-
medium
|
|
38
|
-
}
|
|
39
|
-
description(asHtml: $asHtml)
|
|
40
|
-
primaryOccupations
|
|
41
|
-
gender
|
|
42
|
-
dateOfBirth {
|
|
43
|
-
year
|
|
44
|
-
month
|
|
45
|
-
day
|
|
46
|
-
}
|
|
47
|
-
dateOfDeath {
|
|
48
|
-
year
|
|
49
|
-
month
|
|
50
|
-
day
|
|
51
|
-
}
|
|
52
|
-
age
|
|
53
|
-
yearsActive
|
|
54
|
-
homeTown
|
|
55
|
-
bloodType
|
|
56
|
-
isFavourite
|
|
57
|
-
isFavouriteBlocked
|
|
58
|
-
siteUrl
|
|
59
|
-
staffMedia (sort: $staffMediaSort, type: $staffMediaType, onList: $staffMediaOnList, page: $staffMediaPage, perPage: $staffMediaPerPage) {
|
|
60
|
-
nodes {
|
|
61
|
-
id
|
|
62
|
-
title {
|
|
63
|
-
romaji
|
|
64
|
-
english
|
|
65
|
-
native
|
|
66
|
-
userPreferred
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
characters (sort: $charactersSort, page: $charactersPage, perPage: $charactersPerPage) {
|
|
71
|
-
nodes {
|
|
72
|
-
id
|
|
73
|
-
name {
|
|
74
|
-
first
|
|
75
|
-
last
|
|
76
|
-
full
|
|
77
|
-
native
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
characterMedia (sort: $characterMediaSort, onList: $characterMediaOnList, page: $characterMediaPage, perPage: $characterMediaPerPage) {
|
|
82
|
-
nodes {
|
|
83
|
-
id
|
|
84
|
-
title {
|
|
85
|
-
romaji
|
|
86
|
-
english
|
|
87
|
-
native
|
|
88
|
-
userPreferred
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
submitter {
|
|
93
|
-
id
|
|
94
|
-
name
|
|
95
|
-
}
|
|
96
|
-
submissionStatus
|
|
97
|
-
submissionNotes
|
|
98
|
-
favourites
|
|
99
|
-
modNotes
|
|
26
|
+
${Staff_1.StaffSchema}
|
|
100
27
|
}
|
|
101
28
|
}
|
|
102
29
|
`;
|