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,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionComment = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами комментариев к коллекциям
|
|
6
|
+
*/
|
|
7
|
+
class CollectionComment {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* POST collection/comment/add/{collectionId}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link CommentAddResult}
|
|
15
|
+
* @returns {@link ICollectionCommentAddResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.collectionComment.add(1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async add(collectionId, body, options) {
|
|
21
|
+
return await this.client.call({ path: `/collection/comment/add/${collectionId}`, method: 'POST', json: body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET collection/comment/{collectionId}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link ICollectionComment}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.collectionComment.comment(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async comment(collectionId, options) {
|
|
33
|
+
return await this.client.call({ path: `/collection/comment/${collectionId}`, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET collection/comment/all/{collectionId}/{page}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link IPageableResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.collectionComment.comments(1, 1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async comments(collectionId, page, query, options) {
|
|
45
|
+
return await this.client.call({ path: `/collection/comment/all/${collectionId}/${page}`, queryParams: query, ...options });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* GET collection/comment/delete/{commentId}
|
|
49
|
+
*
|
|
50
|
+
* Возможные коды ответа: {@link CommentDeleteResult}
|
|
51
|
+
* @returns {@link IResponse}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const result = await client.endpoints.collectionComment.delete(1, ...);
|
|
55
|
+
*/
|
|
56
|
+
async delete(commentId, options) {
|
|
57
|
+
return await this.client.call({ path: `/collection/comment/delete/${commentId}`, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* POST collection/comment/edit/{commentId}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link CommentEditResult}
|
|
63
|
+
* @returns {@link IResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.collectionComment.edit(1, ...);
|
|
67
|
+
*/
|
|
68
|
+
async edit(commentId, body, options) {
|
|
69
|
+
return await this.client.call({ path: `/collection/comment/edit/${commentId}`, method: 'POST', json: body, ...options });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* POST collection/comment/process/{commentId}
|
|
73
|
+
*
|
|
74
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
75
|
+
* @returns {@link IResponse}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* const result = await client.endpoints.collectionComment.process(1, ...);
|
|
79
|
+
*/
|
|
80
|
+
async process(commentId, body, options) {
|
|
81
|
+
return await this.client.call({ path: `/collection/comment/process/${commentId}`, method: 'POST', json: body, ...options });
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* GET collection/comment/all/profile/{p_id}/{page}
|
|
85
|
+
*
|
|
86
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
87
|
+
* @returns {@link IPageableResponse}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* const result = await client.endpoints.collectionComment.profileComments(1, 1, ...);
|
|
91
|
+
*/
|
|
92
|
+
async profileComments(profileId, page, query, options) {
|
|
93
|
+
return await this.client.call({ path: `/collection/comment/all/profile/${profileId}/${page}`, queryParams: query, ...options });
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* POST collection/comment/replies/{commentId}/{page}
|
|
97
|
+
*
|
|
98
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
99
|
+
* @returns {@link IPageableResponse}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* const result = await client.endpoints.collectionComment.replies(1, 1, ...);
|
|
103
|
+
*/
|
|
104
|
+
async replies(commentId, page, query, options) {
|
|
105
|
+
return await this.client.call({ path: `/collection/comment/replies/${commentId}/${page}`, method: 'POST', queryParams: query, ...options });
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* GET collection/comment/vote/{commentId}/{vote}
|
|
109
|
+
*
|
|
110
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
111
|
+
* @returns {@link IResponse}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* const result = await client.endpoints.collectionComment.vote(1, 1, ...);
|
|
115
|
+
*/
|
|
116
|
+
async vote(commentId, vote, options) {
|
|
117
|
+
return await this.client.call({ path: `/collection/comment/vote/${commentId}/${vote}`, ...options });
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* GET collection/comment/votes/{commentId}/{page}
|
|
121
|
+
*
|
|
122
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
123
|
+
* @returns {@link IPageableResponse}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* const result = await client.endpoints.collectionComment.votes(1, 1, ...);
|
|
127
|
+
*/
|
|
128
|
+
async votes(commentId, page, query, options) {
|
|
129
|
+
return await this.client.call({ path: `/collection/comment/votes/${commentId}/${page}`, queryParams: query, ...options });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.CollectionComment = CollectionComment;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, ICollection, IFavoriteCollectionAddResponse, IFavoriteCollectionDeleteResponse, IPageableResponse } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами избранных коллекций
|
|
5
|
+
*/
|
|
6
|
+
export declare class CollectionFavorite {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET collectionFavorite/add/{id}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IFavoriteCollectionAddResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.collectionFavorite.add(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
add(collectionId: number, options?: IBaseApiParams): Promise<IFavoriteCollectionAddResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET collectionFavorite/delete/{id}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IFavoriteCollectionDeleteResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.collectionFavorite.delete(1, ...);
|
|
27
|
+
*/
|
|
28
|
+
delete(collectionId: number, options?: IBaseApiParams): Promise<IFavoriteCollectionDeleteResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* GET collectionFavorite/all/{page}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.collectionFavorite.favorites(1, ...);
|
|
37
|
+
*/
|
|
38
|
+
favorites(page: number, options?: IBaseApiParams): Promise<IPageableResponse<ICollection>>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionFavorite = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами избранных коллекций
|
|
6
|
+
*/
|
|
7
|
+
class CollectionFavorite {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET collectionFavorite/add/{id}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IFavoriteCollectionAddResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.collectionFavorite.add(1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async add(collectionId, options) {
|
|
21
|
+
return await this.client.call({ path: `/collectionFavorite/add/${collectionId}`, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET collectionFavorite/delete/{id}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IFavoriteCollectionDeleteResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.collectionFavorite.delete(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async delete(collectionId, options) {
|
|
33
|
+
return await this.client.call({ path: `/collectionFavorite/delete/${collectionId}`, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET collectionFavorite/all/{page}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link IPageableResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.collectionFavorite.favorites(1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async favorites(page, options) {
|
|
45
|
+
return await this.client.call({ path: `/collectionFavorite/all/${page}`, ...options });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.CollectionFavorite = CollectionFavorite;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, ICollectionCreateRequest, ICollectionDeleteResponse, ICollectionEditImageResponse, ICollectionResponse, IPageableResponse, IRelease, IReleaseAddCollectionResponse } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами своих коллекций
|
|
5
|
+
*/
|
|
6
|
+
export declare class CollectionMy {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* POST collectionMy/create
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link CollectionCreateEditResult}
|
|
13
|
+
* @returns {@link ICollectionResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.collectionMy.create(...);
|
|
17
|
+
*/
|
|
18
|
+
create(body: ICollectionCreateRequest, options?: IBaseApiParams): Promise<ICollectionResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET collectionMy/delete/{collectionId}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link ICollectionDeleteResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.collectionMy.delete(1, ...);
|
|
27
|
+
*/
|
|
28
|
+
delete(collectionId: number, options?: IBaseApiParams): Promise<ICollectionDeleteResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* POST collectionMy/edit/{collectionId}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link CollectionCreateEditResult}
|
|
33
|
+
* @returns {@link ICollectionResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.collectionMy.edit(1, ...);
|
|
37
|
+
*/
|
|
38
|
+
edit(collectionId: number, body: ICollectionCreateRequest, options?: IBaseApiParams): Promise<ICollectionResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* POST collectionMy/editImage/{collectionId}
|
|
41
|
+
*
|
|
42
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
43
|
+
* @returns {@link ICollectionEditImageResponse}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const result = await client.endpoints.collectionMy.editImage(1, ...);
|
|
47
|
+
*/
|
|
48
|
+
editImage(collectionId: number, image?: Buffer, name?: string, options?: IBaseApiParams): Promise<ICollectionEditImageResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* GET collectionMy/release/add/{collectionId}
|
|
51
|
+
*
|
|
52
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
53
|
+
* @returns {@link IReleaseAddCollectionResponse}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await client.endpoints.collectionMy.releaseAdd(1, ...);
|
|
57
|
+
*/
|
|
58
|
+
releaseAdd(collectionId: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IReleaseAddCollectionResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* GET collectionMy/{id}/releases
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IPageableResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.collectionMy.releases(1, ...);
|
|
67
|
+
*/
|
|
68
|
+
releases(collectionId: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionMy = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами своих коллекций
|
|
6
|
+
*/
|
|
7
|
+
class CollectionMy {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* POST collectionMy/create
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link CollectionCreateEditResult}
|
|
15
|
+
* @returns {@link ICollectionResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.collectionMy.create(...);
|
|
19
|
+
*/
|
|
20
|
+
async create(body, options) {
|
|
21
|
+
return await this.client.call({ path: `/collectionMy/create`, method: 'POST', json: body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET collectionMy/delete/{collectionId}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link ICollectionDeleteResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.collectionMy.delete(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async delete(collectionId, options) {
|
|
33
|
+
return await this.client.call({ path: `/collectionMy/delete/${collectionId}`, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* POST collectionMy/edit/{collectionId}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link CollectionCreateEditResult}
|
|
39
|
+
* @returns {@link ICollectionResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.collectionMy.edit(1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async edit(collectionId, body, options) {
|
|
45
|
+
return await this.client.call({ path: `/collectionMy/edit/${collectionId}`, method: 'POST', json: body, ...options });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* POST collectionMy/editImage/{collectionId}
|
|
49
|
+
*
|
|
50
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
51
|
+
* @returns {@link ICollectionEditImageResponse}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const result = await client.endpoints.collectionMy.editImage(1, ...);
|
|
55
|
+
*/
|
|
56
|
+
async editImage(collectionId, image, name, options) {
|
|
57
|
+
return await this.client.call({ path: `/collectionMy/editImage/${collectionId}`, method: 'POST', image: image ? { type: 'image', name: name !== null && name !== void 0 ? name : 'image.jpg', stream: image } : undefined, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* GET collectionMy/release/add/{collectionId}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IReleaseAddCollectionResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.collectionMy.releaseAdd(1, ...);
|
|
67
|
+
*/
|
|
68
|
+
async releaseAdd(collectionId, query, options) {
|
|
69
|
+
return await this.client.call({ path: `/collectionMy/release/add/${collectionId}`, queryParams: query, ...options });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* GET collectionMy/{id}/releases
|
|
73
|
+
*
|
|
74
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
75
|
+
* @returns {@link IPageableResponse}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* const result = await client.endpoints.collectionMy.releases(1, ...);
|
|
79
|
+
*/
|
|
80
|
+
async releases(collectionId, options) {
|
|
81
|
+
return await this.client.call({ path: `/collectionMy/${collectionId}/releases`, ...options });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.CollectionMy = CollectionMy;
|
|
@@ -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("./collection"), exports);
|
|
18
|
+
__exportStar(require("./collectionMy"), exports);
|
|
19
|
+
__exportStar(require("./collectionFavorite"), exports);
|
|
20
|
+
__exportStar(require("./collectionComment"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Anixart } from "../client";
|
|
2
|
+
import { IBaseApiParams, IConfigUrlsResponse, ITogglesResponse } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами конфигурации
|
|
5
|
+
*/
|
|
6
|
+
export declare class Config {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET config/toggles
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link ITogglesResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.config.toggles(...);
|
|
17
|
+
*/
|
|
18
|
+
toggles(query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<ITogglesResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET config/urls
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IConfigUrlsResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.config.urls(...);
|
|
27
|
+
*/
|
|
28
|
+
urls(query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IConfigUrlsResponse>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Config = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами конфигурации
|
|
6
|
+
*/
|
|
7
|
+
class Config {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET config/toggles
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link ITogglesResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.config.toggles(...);
|
|
19
|
+
*/
|
|
20
|
+
async toggles(query, options) {
|
|
21
|
+
return await this.client.call({ path: `/config/toggles`, queryParams: query, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET config/urls
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IConfigUrlsResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.config.urls(...);
|
|
31
|
+
*/
|
|
32
|
+
async urls(query, options) {
|
|
33
|
+
return await this.client.call({ path: `/config/urls`, queryParams: query, ...options });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Config = Config;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Anixart } from "../client";
|
|
2
|
+
import { IBaseApiParams, IInteresting, IPageableResponse, IRelease, IReleaseComment } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами обзора
|
|
5
|
+
*/
|
|
6
|
+
export declare class Discover {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* POST discover/comments
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IPageableResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.discover.commentsWeek(...);
|
|
17
|
+
*/
|
|
18
|
+
commentsWeek(options?: IBaseApiParams): Promise<IPageableResponse<IReleaseComment>>;
|
|
19
|
+
/**
|
|
20
|
+
* POST discover/discussing
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IPageableResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.discover.discussing(...);
|
|
27
|
+
*/
|
|
28
|
+
discussing(options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
29
|
+
/**
|
|
30
|
+
* POST discover/interesting
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.discover.interesting(...);
|
|
37
|
+
*/
|
|
38
|
+
interesting(options?: IBaseApiParams): Promise<IPageableResponse<IInteresting>>;
|
|
39
|
+
/**
|
|
40
|
+
* POST discover/recommendations/{page}
|
|
41
|
+
*
|
|
42
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
43
|
+
* @returns {@link IPageableResponse}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const result = await client.endpoints.discover.recommendations(1, ...);
|
|
47
|
+
*/
|
|
48
|
+
recommendations(page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
49
|
+
/**
|
|
50
|
+
* POST discover/watching/{page}
|
|
51
|
+
*
|
|
52
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
53
|
+
* @returns {@link IPageableResponse}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await client.endpoints.discover.watching(1, ...);
|
|
57
|
+
*/
|
|
58
|
+
watching(page: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Discover = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами обзора
|
|
6
|
+
*/
|
|
7
|
+
class Discover {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* POST discover/comments
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IPageableResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.discover.commentsWeek(...);
|
|
19
|
+
*/
|
|
20
|
+
async commentsWeek(options) {
|
|
21
|
+
return await this.client.call({ path: `/discover/comments`, method: 'POST', ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* POST discover/discussing
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IPageableResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.discover.discussing(...);
|
|
31
|
+
*/
|
|
32
|
+
async discussing(options) {
|
|
33
|
+
return await this.client.call({ path: `/discover/discussing`, method: 'POST', ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* POST discover/interesting
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link IPageableResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.discover.interesting(...);
|
|
43
|
+
*/
|
|
44
|
+
async interesting(options) {
|
|
45
|
+
return await this.client.call({ path: `/discover/interesting`, method: 'POST', ...options });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* POST discover/recommendations/{page}
|
|
49
|
+
*
|
|
50
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
51
|
+
* @returns {@link IPageableResponse}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const result = await client.endpoints.discover.recommendations(1, ...);
|
|
55
|
+
*/
|
|
56
|
+
async recommendations(page, query, options) {
|
|
57
|
+
return await this.client.call({ path: `/discover/recommendations/${page}`, method: 'POST', queryParams: query, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* POST discover/watching/{page}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IPageableResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.discover.watching(1, ...);
|
|
67
|
+
*/
|
|
68
|
+
async watching(page, options) {
|
|
69
|
+
return await this.client.call({ path: `/discover/watching/${page}`, method: 'POST', ...options });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.Discover = Discover;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Anixart } from "../client";
|
|
2
|
+
import { IArticle, IBaseApiParams, ILatestArticleResponse, IPageableResponse } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами ленты
|
|
5
|
+
*/
|
|
6
|
+
export declare class Feed {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET feed/all/{page}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IPageableResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.feed.feed(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
feed(page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<IArticle>>;
|
|
19
|
+
/**
|
|
20
|
+
* GET feed/latest
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link ILatestArticleResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.feed.latestArticle(...);
|
|
27
|
+
*/
|
|
28
|
+
latestArticle(options?: IBaseApiParams): Promise<ILatestArticleResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* GET feed/latest/all/{page}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.feed.latestArticles(1, ...);
|
|
37
|
+
*/
|
|
38
|
+
latestArticles(page: number, options?: IBaseApiParams): Promise<IPageableResponse<IArticle>>;
|
|
39
|
+
}
|