anixapi 0.2.1
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/LICENSE +339 -0
- package/README.md +165 -0
- package/dist/api/auth.d.ts +129 -0
- package/dist/api/auth.js +156 -0
- package/dist/api/bookmarks/export.d.ts +19 -0
- package/dist/api/bookmarks/export.js +24 -0
- package/dist/api/bookmarks/import.d.ts +29 -0
- package/dist/api/bookmarks/import.js +36 -0
- package/dist/api/bookmarks/index.d.ts +2 -0
- package/dist/api/bookmarks/index.js +18 -0
- package/dist/api/channel/article.d.ts +119 -0
- package/dist/api/channel/article.js +144 -0
- package/dist/api/channel/articleComment.d.ts +119 -0
- package/dist/api/channel/articleComment.js +144 -0
- package/dist/api/channel/articleSuggestion.d.ts +69 -0
- package/dist/api/channel/articleSuggestion.js +84 -0
- package/dist/api/channel/channel.d.ts +249 -0
- package/dist/api/channel/channel.js +300 -0
- package/dist/api/channel/index.d.ts +4 -0
- package/dist/api/channel/index.js +20 -0
- package/dist/api/collection/collection.d.ts +59 -0
- package/dist/api/collection/collection.js +72 -0
- package/dist/api/collection/collectionComment.d.ts +109 -0
- package/dist/api/collection/collectionComment.js +132 -0
- package/dist/api/collection/collectionFavorite.d.ts +39 -0
- package/dist/api/collection/collectionFavorite.js +48 -0
- package/dist/api/collection/collectionMy.d.ts +69 -0
- package/dist/api/collection/collectionMy.js +84 -0
- package/dist/api/collection/index.d.ts +4 -0
- package/dist/api/collection/index.js +20 -0
- package/dist/api/config.d.ts +29 -0
- package/dist/api/config.js +36 -0
- package/dist/api/discover.d.ts +59 -0
- package/dist/api/discover.js +72 -0
- package/dist/api/feed.d.ts +39 -0
- package/dist/api/feed.js +48 -0
- package/dist/api/index.d.ts +12 -0
- package/dist/api/index.js +28 -0
- package/dist/api/notification/index.d.ts +2 -0
- package/dist/api/notification/index.js +18 -0
- package/dist/api/notification/notification.d.ts +199 -0
- package/dist/api/notification/notification.js +240 -0
- package/dist/api/notification/notificationPreference.d.ts +159 -0
- package/dist/api/notification/notificationPreference.js +192 -0
- package/dist/api/profile/index.d.ts +10 -0
- package/dist/api/profile/index.js +26 -0
- package/dist/api/profile/profile.d.ts +65 -0
- package/dist/api/profile/profile.js +80 -0
- package/dist/api/profile/profileBadge.d.ts +39 -0
- package/dist/api/profile/profileBadge.js +48 -0
- package/dist/api/profile/profileBlockList.d.ts +39 -0
- package/dist/api/profile/profileBlockList.js +48 -0
- package/dist/api/profile/profileDeletion.d.ts +39 -0
- package/dist/api/profile/profileDeletion.js +48 -0
- package/dist/api/profile/profileFriend.d.ts +99 -0
- package/dist/api/profile/profileFriend.js +120 -0
- package/dist/api/profile/profileHealth.d.ts +59 -0
- package/dist/api/profile/profileHealth.js +72 -0
- package/dist/api/profile/profileList.d.ts +49 -0
- package/dist/api/profile/profileList.js +60 -0
- package/dist/api/profile/profilePreference.d.ts +239 -0
- package/dist/api/profile/profilePreference.js +288 -0
- package/dist/api/profile/profileReleaseVote.d.ts +39 -0
- package/dist/api/profile/profileReleaseVote.js +48 -0
- package/dist/api/profile/profileRoleList.d.ts +19 -0
- package/dist/api/profile/profileRoleList.js +24 -0
- package/dist/api/release/episode.d.ts +99 -0
- package/dist/api/release/episode.js +120 -0
- package/dist/api/release/favorite.d.ts +39 -0
- package/dist/api/release/favorite.js +48 -0
- package/dist/api/release/filter.d.ts +19 -0
- package/dist/api/release/filter.js +24 -0
- package/dist/api/release/history.d.ts +39 -0
- package/dist/api/release/history.js +48 -0
- package/dist/api/release/index.d.ts +13 -0
- package/dist/api/release/index.js +29 -0
- package/dist/api/release/related.d.ts +19 -0
- package/dist/api/release/related.js +24 -0
- package/dist/api/release/release.d.ts +79 -0
- package/dist/api/release/release.js +96 -0
- package/dist/api/release/releaseComment.d.ts +109 -0
- package/dist/api/release/releaseComment.js +132 -0
- package/dist/api/release/releaseStreamingPlatform.d.ts +19 -0
- package/dist/api/release/releaseStreamingPlatform.js +24 -0
- package/dist/api/release/releaseVideo.d.ts +59 -0
- package/dist/api/release/releaseVideo.js +72 -0
- package/dist/api/release/releaseVideoAppeal.d.ts +49 -0
- package/dist/api/release/releaseVideoAppeal.js +60 -0
- package/dist/api/release/releaseVideoFavorite.d.ts +39 -0
- package/dist/api/release/releaseVideoFavorite.js +48 -0
- package/dist/api/release/schedule.d.ts +19 -0
- package/dist/api/release/schedule.js +24 -0
- package/dist/api/release/type.d.ts +39 -0
- package/dist/api/release/type.js +48 -0
- package/dist/api/report.d.ts +189 -0
- package/dist/api/report.js +228 -0
- package/dist/api/search.d.ts +129 -0
- package/dist/api/search.js +156 -0
- package/dist/classes/Article.d.ts +18 -0
- package/dist/classes/Article.js +44 -0
- package/dist/classes/ArticleComment.d.ts +15 -0
- package/dist/classes/ArticleComment.js +37 -0
- package/dist/classes/BaseArticle.d.ts +21 -0
- package/dist/classes/BaseArticle.js +23 -0
- package/dist/classes/BaseComment.d.ts +22 -0
- package/dist/classes/BaseComment.js +25 -0
- package/dist/classes/BaseProfile.d.ts +29 -0
- package/dist/classes/BaseProfile.js +52 -0
- package/dist/classes/Channel.d.ts +47 -0
- package/dist/classes/Channel.js +108 -0
- package/dist/classes/Collection.d.ts +29 -0
- package/dist/classes/Collection.js +58 -0
- package/dist/classes/Dubber.d.ts +19 -0
- package/dist/classes/Dubber.js +24 -0
- package/dist/classes/Episode.d.ts +20 -0
- package/dist/classes/Episode.js +30 -0
- package/dist/classes/FullProfile.d.ts +70 -0
- package/dist/classes/FullProfile.js +92 -0
- package/dist/classes/Release.d.ts +91 -0
- package/dist/classes/Release.js +150 -0
- package/dist/classes/ReleaseComment.d.ts +16 -0
- package/dist/classes/ReleaseComment.js +45 -0
- package/dist/classes/Source.d.ts +15 -0
- package/dist/classes/Source.js +20 -0
- package/dist/classes/SuggestionArticle.d.ts +14 -0
- package/dist/classes/SuggestionArticle.js +30 -0
- package/dist/client.d.ts +49 -0
- package/dist/client.js +183 -0
- package/dist/endpoints.d.ts +63 -0
- package/dist/endpoints.js +67 -0
- package/dist/errors.d.ts +37 -0
- package/dist/errors.js +122 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +23 -0
- package/dist/types/auth.d.ts +127 -0
- package/dist/types/auth.js +47 -0
- package/dist/types/channel.d.ts +350 -0
- package/dist/types/channel.js +104 -0
- package/dist/types/collection.d.ts +105 -0
- package/dist/types/collection.js +44 -0
- package/dist/types/config.d.ts +41 -0
- package/dist/types/config.js +4 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.js +26 -0
- package/dist/types/notification.d.ts +81 -0
- package/dist/types/notification.js +2 -0
- package/dist/types/profile.d.ts +339 -0
- package/dist/types/profile.js +46 -0
- package/dist/types/release.d.ts +467 -0
- package/dist/types/release.js +39 -0
- package/dist/types/request.d.ts +138 -0
- package/dist/types/request.js +2 -0
- package/dist/types/response.d.ts +104 -0
- package/dist/types/response.js +35 -0
- package/dist/types/settings.d.ts +119 -0
- package/dist/types/settings.js +48 -0
- package/dist/utils/ArticleBuilder.d.ts +38 -0
- package/dist/utils/ArticleBuilder.js +144 -0
- package/dist/utils/LinkParser.d.ts +253 -0
- package/dist/utils/LinkParser.js +253 -0
- package/dist/utils/Utils.d.ts +3 -0
- package/dist/utils/Utils.js +11 -0
- package/docs/DOCUMENTATION.md +290 -0
- package/package.json +55 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Channel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами каналов
|
|
6
|
+
*/
|
|
7
|
+
class Channel {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* POST channel/{c_id}/article/all/{page}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IPageableResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.channel.articles(1, 1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async articles(channelId, page, options) {
|
|
21
|
+
return await this.client.call({ path: `/channel/${channelId}/article/all/${page}`, method: 'POST', ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* POST channel/avatar/upload/{c_id}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IChannelUploadCoverAvatarResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.channel.avatarUpload(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async avatarUpload(channelId, image, name, options) {
|
|
33
|
+
return await this.client.call({ path: `/channel/avatar/upload/${channelId}`, method: 'POST', image: image ? { type: 'image', name: name !== null && name !== void 0 ? name : 'image.jpg', stream: image } : undefined, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET channel/{c_id}/block/{p_id}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link ChannelBlockResult}
|
|
39
|
+
* @returns {@link IChannelBlockInfoResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.channel.block(1, 1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async block(channelId, profileId, options) {
|
|
45
|
+
return await this.client.call({ path: `/channel/${channelId}/block/${profileId}`, ...options });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* POST channel/{c_id}/block/manage
|
|
49
|
+
*
|
|
50
|
+
* Возможные коды ответа: {@link ChannelBlockResult}
|
|
51
|
+
* @returns {@link IChannelBlockInfoResponse}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const result = await client.endpoints.channel.blockManage(1, ...);
|
|
55
|
+
*/
|
|
56
|
+
async blockManage(channelId, body, options) {
|
|
57
|
+
return await this.client.call({ path: `/channel/${channelId}/block/manage`, method: 'POST', json: body, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* GET channel/{c_id}/block/all/{page}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IPageableResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.channel.blocks(1, 1, ...);
|
|
67
|
+
*/
|
|
68
|
+
async blocks(channelId, page, options) {
|
|
69
|
+
return await this.client.call({ path: `/channel/${channelId}/block/all/${page}`, ...options });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* GET channel/blog/{p_id}
|
|
73
|
+
*
|
|
74
|
+
* Возможные коды ответа: {@link ChannelResult}
|
|
75
|
+
* @returns {@link IChannelResponse}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* const result = await client.endpoints.channel.blog(1, ...);
|
|
79
|
+
*/
|
|
80
|
+
async blog(profileId, options) {
|
|
81
|
+
return await this.client.call({ path: `/channel/blog/${profileId}`, ...options });
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* GET channel/{c_id}
|
|
85
|
+
*
|
|
86
|
+
* Возможные коды ответа: {@link ChannelResult}
|
|
87
|
+
* @returns {@link IChannelResponse}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* const result = await client.endpoints.channel.channel(1, ...);
|
|
91
|
+
*/
|
|
92
|
+
async channel(channelId, options) {
|
|
93
|
+
return await this.client.call({ path: `/channel/${channelId}`, ...options });
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* POST channel/all/{page}
|
|
97
|
+
*
|
|
98
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
99
|
+
* @returns {@link IPageableResponse}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* const result = await client.endpoints.channel.channels(1, ...);
|
|
103
|
+
*/
|
|
104
|
+
async channels(page, body, options) {
|
|
105
|
+
return await this.client.call({ path: `/channel/all/${page}`, method: 'POST', json: body, ...options });
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* POST channel/cover/delete/{c_id}
|
|
109
|
+
*
|
|
110
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
111
|
+
* @returns {@link IChannelUploadCoverAvatarResponse}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* const result = await client.endpoints.channel.coverDelete(1, ...);
|
|
115
|
+
*/
|
|
116
|
+
async coverDelete(channelId, options) {
|
|
117
|
+
return await this.client.call({ path: `/channel/cover/delete/${channelId}`, method: 'POST', ...options });
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* POST channel/cover/upload/{c_id}
|
|
121
|
+
*
|
|
122
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
123
|
+
* @returns {@link IChannelUploadCoverAvatarResponse}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* const result = await client.endpoints.channel.coverUpload(1, ...);
|
|
127
|
+
*/
|
|
128
|
+
async coverUpload(channelId, image, name, options) {
|
|
129
|
+
return await this.client.call({ path: `/channel/cover/upload/${channelId}`, method: 'POST', image: image ? { type: 'image', name: name !== null && name !== void 0 ? name : 'image.jpg', stream: image } : undefined, ...options });
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* POST channel/create
|
|
133
|
+
*
|
|
134
|
+
* Возможные коды ответа: {@link ChannelCreateEditResult}
|
|
135
|
+
* @returns {@link IChannelResponse}
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* const result = await client.endpoints.channel.create(...);
|
|
139
|
+
*/
|
|
140
|
+
async create(body, options) {
|
|
141
|
+
return await this.client.call({ path: `/channel/create`, method: 'POST', json: body, ...options });
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* POST channel/blog/create
|
|
145
|
+
*
|
|
146
|
+
* Возможные коды ответа: {@link BlogCreateResult}
|
|
147
|
+
* @returns {@link IChannelResponse}
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* const result = await client.endpoints.channel.createBlog(...);
|
|
151
|
+
*/
|
|
152
|
+
async createBlog(options) {
|
|
153
|
+
return await this.client.call({ path: `/channel/blog/create`, method: 'POST', ...options });
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* POST channel/edit/{c_id}
|
|
157
|
+
*
|
|
158
|
+
* Возможные коды ответа: {@link ChannelCreateEditResult}
|
|
159
|
+
* @returns {@link IChannelResponse}
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* const result = await client.endpoints.channel.edit(1, ...);
|
|
163
|
+
*/
|
|
164
|
+
async edit(channelId, body, options) {
|
|
165
|
+
return await this.client.call({ path: `/channel/edit/${channelId}`, method: 'POST', json: body, ...options });
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* GET channel/{c_id}/editor/available
|
|
169
|
+
*
|
|
170
|
+
* Возможные коды ответа: {@link EditorAvaliableResult}
|
|
171
|
+
* @returns {@link IChannelMediaTokenResponse}
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* const result = await client.endpoints.channel.editorAvailable(1, ...);
|
|
175
|
+
*/
|
|
176
|
+
async editorAvailable(channelId, query, options) {
|
|
177
|
+
return await this.client.call({ path: `/channel/${channelId}/editor/available`, queryParams: query, ...options });
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* POST channel/mute/{c_id}
|
|
181
|
+
*
|
|
182
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
183
|
+
* @returns {@link IArticleMuteResponse}
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* const result = await client.endpoints.channel.mute(1, ...);
|
|
187
|
+
*/
|
|
188
|
+
async mute(channelId, options) {
|
|
189
|
+
return await this.client.call({ path: `/channel/mute/${channelId}`, method: 'POST', ...options });
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* GET channel/mute/all/{page}
|
|
193
|
+
*
|
|
194
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
195
|
+
* @returns {@link IPageableResponse}
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* const result = await client.endpoints.channel.mutes(1, ...);
|
|
199
|
+
*/
|
|
200
|
+
async mutes(page, options) {
|
|
201
|
+
return await this.client.call({ path: `/channel/mute/all/${page}`, ...options });
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* POST channel/{c_id}/permission/manage
|
|
205
|
+
*
|
|
206
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
207
|
+
* @returns {@link IChannelPermissionManageResponse}
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* const result = await client.endpoints.channel.permissionManage(1, ...);
|
|
211
|
+
*/
|
|
212
|
+
async permissionManage(channelId, body, options) {
|
|
213
|
+
return await this.client.call({ path: `/channel/${channelId}/permission/manage`, method: 'POST', json: body, ...options });
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* POST channel/{c_id}/permission/all/{page}
|
|
217
|
+
*
|
|
218
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
219
|
+
* @returns {@link IPageableResponse}
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* const result = await client.endpoints.channel.permissions(1, 1, ...);
|
|
223
|
+
*/
|
|
224
|
+
async permissions(channelId, page, body, options) {
|
|
225
|
+
return await this.client.call({ path: `/channel/${channelId}/permission/all/${page}`, method: 'POST', json: body, ...options });
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* GET channel/recommendations/{page}
|
|
229
|
+
*
|
|
230
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
231
|
+
* @returns {@link IPageableResponse}
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* const result = await client.endpoints.channel.recommendations(1, ...);
|
|
235
|
+
*/
|
|
236
|
+
async recommendations(page, query, options) {
|
|
237
|
+
return await this.client.call({ path: `/channel/recommendations/${page}`, queryParams: query, ...options });
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* POST channel/subscribe/{c_id}
|
|
241
|
+
*
|
|
242
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
243
|
+
* @returns {@link IChannelSubscribeResponse}
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* const result = await client.endpoints.channel.subscribe(1, ...);
|
|
247
|
+
*/
|
|
248
|
+
async subscribe(channelId, options) {
|
|
249
|
+
return await this.client.call({ path: `/channel/subscribe/${channelId}`, method: 'POST', ...options });
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* GET channel/subscription/count
|
|
253
|
+
*
|
|
254
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
255
|
+
* @returns {@link ISubscriptionCountResponse}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* const result = await client.endpoints.channel.subscriptionCount(...);
|
|
259
|
+
*/
|
|
260
|
+
async subscriptionCount(options) {
|
|
261
|
+
return await this.client.call({ path: `/channel/subscription/count`, ...options });
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* GET channel/subscription/all/{page}
|
|
265
|
+
*
|
|
266
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
267
|
+
* @returns {@link IPageableResponse}
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* const result = await client.endpoints.channel.subscriptions(1, ...);
|
|
271
|
+
*/
|
|
272
|
+
async subscriptions(page, query, options) {
|
|
273
|
+
return await this.client.call({ path: `/channel/subscription/all/${page}`, queryParams: query, ...options });
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* POST channel/unmute/{c_id}
|
|
277
|
+
*
|
|
278
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
279
|
+
* @returns {@link IArticleMuteResponse}
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* const result = await client.endpoints.channel.unmute(1, ...);
|
|
283
|
+
*/
|
|
284
|
+
async unmute(channelId, options) {
|
|
285
|
+
return await this.client.call({ path: `/channel/unmute/${channelId}`, method: 'POST', ...options });
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* POST channel/unsubscribe/{c_id}
|
|
289
|
+
*
|
|
290
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
291
|
+
* @returns {@link IChannelUnsubscribeResponse}
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* const result = await client.endpoints.channel.unsubscribe(1, ...);
|
|
295
|
+
*/
|
|
296
|
+
async unsubscribe(channelId, options) {
|
|
297
|
+
return await this.client.call({ path: `/channel/unsubscribe/${channelId}`, method: 'POST', ...options });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
exports.Channel = Channel;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./channel"), exports);
|
|
18
|
+
__exportStar(require("./article"), exports);
|
|
19
|
+
__exportStar(require("./articleComment"), exports);
|
|
20
|
+
__exportStar(require("./articleSuggestion"), exports);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, ICollection, ICollectionResponse, IPageableResponse, IRelease } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами коллекций
|
|
5
|
+
*/
|
|
6
|
+
export declare class Collection {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET collection/{id}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link CollectionResult}
|
|
13
|
+
* @returns {@link ICollectionResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.collection.collection(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
collection(collectionId: number, options?: IBaseApiParams): Promise<ICollectionResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET collection/all/{page}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IPageableResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.collection.collections(1, ...);
|
|
27
|
+
*/
|
|
28
|
+
collections(page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<ICollection>>;
|
|
29
|
+
/**
|
|
30
|
+
* GET collection/all/profile/{p_id}/{page}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.collection.profileCollections(1, 1, ...);
|
|
37
|
+
*/
|
|
38
|
+
profileCollections(profileId: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<ICollection>>;
|
|
39
|
+
/**
|
|
40
|
+
* GET collection/all/release/{r_id}/{page}
|
|
41
|
+
*
|
|
42
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
43
|
+
* @returns {@link IPageableResponse}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const result = await client.endpoints.collection.releaseCollections(1, 1, ...);
|
|
47
|
+
*/
|
|
48
|
+
releaseCollections(releaseId: number, page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<ICollection>>;
|
|
49
|
+
/**
|
|
50
|
+
* GET collection/{id}/releases/{page}
|
|
51
|
+
*
|
|
52
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
53
|
+
* @returns {@link IPageableResponse}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await client.endpoints.collection.releases(1, 1, ...);
|
|
57
|
+
*/
|
|
58
|
+
releases(collectionId: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Collection = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами коллекций
|
|
6
|
+
*/
|
|
7
|
+
class Collection {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET collection/{id}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link CollectionResult}
|
|
15
|
+
* @returns {@link ICollectionResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.collection.collection(1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async collection(collectionId, options) {
|
|
21
|
+
return await this.client.call({ path: `/collection/${collectionId}`, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET collection/all/{page}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IPageableResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.collection.collections(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async collections(page, query, options) {
|
|
33
|
+
return await this.client.call({ path: `/collection/all/${page}`, queryParams: query, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET collection/all/profile/{p_id}/{page}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link IPageableResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.collection.profileCollections(1, 1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async profileCollections(profileId, page, options) {
|
|
45
|
+
return await this.client.call({ path: `/collection/all/profile/${profileId}/${page}`, ...options });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* GET collection/all/release/{r_id}/{page}
|
|
49
|
+
*
|
|
50
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
51
|
+
* @returns {@link IPageableResponse}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const result = await client.endpoints.collection.releaseCollections(1, 1, ...);
|
|
55
|
+
*/
|
|
56
|
+
async releaseCollections(releaseId, page, query, options) {
|
|
57
|
+
return await this.client.call({ path: `/collection/all/release/${releaseId}/${page}`, queryParams: query, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* GET collection/{id}/releases/{page}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IPageableResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.collection.releases(1, 1, ...);
|
|
67
|
+
*/
|
|
68
|
+
async releases(collectionId, page, options) {
|
|
69
|
+
return await this.client.call({ path: `/collection/${collectionId}/releases/${page}`, ...options });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.Collection = Collection;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { CommentDeleteResult, CommentEditResult, IBaseApiParams, IBaseCommentAddRequest, ICollectionComment, ICollectionCommentAddResponse, ICommentEditRequest, ICommentProcessRequest, IPageableResponse, IProfile, IResponse } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами комментариев к коллекциям
|
|
5
|
+
*/
|
|
6
|
+
export declare class CollectionComment {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* POST collection/comment/add/{collectionId}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link CommentAddResult}
|
|
13
|
+
* @returns {@link ICollectionCommentAddResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.collectionComment.add(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
add(collectionId: number, body: IBaseCommentAddRequest, options?: IBaseApiParams): Promise<ICollectionCommentAddResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET collection/comment/{collectionId}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link ICollectionComment}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.collectionComment.comment(1, ...);
|
|
27
|
+
*/
|
|
28
|
+
comment(collectionId: number, options?: IBaseApiParams): Promise<ICollectionComment>;
|
|
29
|
+
/**
|
|
30
|
+
* GET collection/comment/all/{collectionId}/{page}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.collectionComment.comments(1, 1, ...);
|
|
37
|
+
*/
|
|
38
|
+
comments(collectionId: number, page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<ICollectionComment>>;
|
|
39
|
+
/**
|
|
40
|
+
* GET collection/comment/delete/{commentId}
|
|
41
|
+
*
|
|
42
|
+
* Возможные коды ответа: {@link CommentDeleteResult}
|
|
43
|
+
* @returns {@link IResponse}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const result = await client.endpoints.collectionComment.delete(1, ...);
|
|
47
|
+
*/
|
|
48
|
+
delete(commentId: number, options?: IBaseApiParams): Promise<IResponse<CommentDeleteResult>>;
|
|
49
|
+
/**
|
|
50
|
+
* POST collection/comment/edit/{commentId}
|
|
51
|
+
*
|
|
52
|
+
* Возможные коды ответа: {@link CommentEditResult}
|
|
53
|
+
* @returns {@link IResponse}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await client.endpoints.collectionComment.edit(1, ...);
|
|
57
|
+
*/
|
|
58
|
+
edit(commentId: number, body: ICommentEditRequest, options?: IBaseApiParams): Promise<IResponse<CommentEditResult>>;
|
|
59
|
+
/**
|
|
60
|
+
* POST collection/comment/process/{commentId}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.collectionComment.process(1, ...);
|
|
67
|
+
*/
|
|
68
|
+
process(commentId: number, body: ICommentProcessRequest, options?: IBaseApiParams): Promise<IResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* GET collection/comment/all/profile/{p_id}/{page}
|
|
71
|
+
*
|
|
72
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
73
|
+
* @returns {@link IPageableResponse}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* const result = await client.endpoints.collectionComment.profileComments(1, 1, ...);
|
|
77
|
+
*/
|
|
78
|
+
profileComments(profileId: number, page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<ICollectionComment>>;
|
|
79
|
+
/**
|
|
80
|
+
* POST collection/comment/replies/{commentId}/{page}
|
|
81
|
+
*
|
|
82
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
83
|
+
* @returns {@link IPageableResponse}
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* const result = await client.endpoints.collectionComment.replies(1, 1, ...);
|
|
87
|
+
*/
|
|
88
|
+
replies(commentId: number, page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<ICollectionComment>>;
|
|
89
|
+
/**
|
|
90
|
+
* GET collection/comment/vote/{commentId}/{vote}
|
|
91
|
+
*
|
|
92
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
93
|
+
* @returns {@link IResponse}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const result = await client.endpoints.collectionComment.vote(1, 1, ...);
|
|
97
|
+
*/
|
|
98
|
+
vote(commentId: number, vote: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
99
|
+
/**
|
|
100
|
+
* GET collection/comment/votes/{commentId}/{page}
|
|
101
|
+
*
|
|
102
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
103
|
+
* @returns {@link IPageableResponse}
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* const result = await client.endpoints.collectionComment.votes(1, 1, ...);
|
|
107
|
+
*/
|
|
108
|
+
votes(commentId: number, page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<IProfile>>;
|
|
109
|
+
}
|