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,99 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, IEpisodeResponse, IEpisodeUnwatchResponse, IEpisodeUpdate, IEpisodeWatchResponse, IEpisodesResponse, IPageableResponse, ISourcesResponse, ITypeResponse } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами эпизодов
|
|
5
|
+
*/
|
|
6
|
+
export declare class Episode {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET episode/target/{releaseId}/{sourceId}/{position}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IEpisodeResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.episode.episodeTarget(1, 1, 1, ...);
|
|
17
|
+
*/
|
|
18
|
+
episodeTarget(releaseId: number, sourceId: number, position: number, options?: IBaseApiParams): Promise<IEpisodeResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET episode/{releaseId}/{typeId}/{sourceId}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IEpisodesResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.episode.episodes(1, 1, 1, ...);
|
|
27
|
+
*/
|
|
28
|
+
episodes(releaseId: number, typeId: number, sourceId: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IEpisodesResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* GET episode/{releaseId}/{typeId}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link ISourcesResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.episode.sources(1, 1, ...);
|
|
37
|
+
*/
|
|
38
|
+
sources(releaseId: number, typeId: number, options?: IBaseApiParams): Promise<ISourcesResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* GET episode/{releaseId}
|
|
41
|
+
*
|
|
42
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
43
|
+
* @returns {@link ITypeResponse}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const result = await client.endpoints.episode.types(1, ...);
|
|
47
|
+
*/
|
|
48
|
+
types(releaseId: number, options?: IBaseApiParams): Promise<ITypeResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* POST episode/unwatch/{releaseId}/{sourceId}/{position}
|
|
51
|
+
*
|
|
52
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
53
|
+
* @returns {@link IEpisodeUnwatchResponse}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await client.endpoints.episode.unwatch(1, 1, 1, ...);
|
|
57
|
+
*/
|
|
58
|
+
unwatch(releaseId: number, sourceId: number, position: number, options?: IBaseApiParams): Promise<IEpisodeUnwatchResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* POST episode/unwatch/{releaseId}/{sourceId}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IEpisodeUnwatchResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.episode.unwatch2(1, 1, ...);
|
|
67
|
+
*/
|
|
68
|
+
unwatch2(releaseId: number, sourceId: number, options?: IBaseApiParams): Promise<IEpisodeUnwatchResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* GET episode/updates/{releaseId}/{page}
|
|
71
|
+
*
|
|
72
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
73
|
+
* @returns {@link IPageableResponse}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* const result = await client.endpoints.episode.updates(1, 1, ...);
|
|
77
|
+
*/
|
|
78
|
+
updates(releaseId: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<IEpisodeUpdate>>;
|
|
79
|
+
/**
|
|
80
|
+
* POST episode/watch/{releaseId}/{sourceId}/{position}
|
|
81
|
+
*
|
|
82
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
83
|
+
* @returns {@link IEpisodeWatchResponse}
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* const result = await client.endpoints.episode.watch(1, 1, 1, ...);
|
|
87
|
+
*/
|
|
88
|
+
watch(releaseId: number, sourceId: number, position: number, options?: IBaseApiParams): Promise<IEpisodeWatchResponse>;
|
|
89
|
+
/**
|
|
90
|
+
* POST episode/watch/{releaseId}/{sourceId}
|
|
91
|
+
*
|
|
92
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
93
|
+
* @returns {@link IEpisodeWatchResponse}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const result = await client.endpoints.episode.watch2(1, 1, ...);
|
|
97
|
+
*/
|
|
98
|
+
watch2(releaseId: number, sourceId: number, options?: IBaseApiParams): Promise<IEpisodeWatchResponse>;
|
|
99
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Episode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами эпизодов
|
|
6
|
+
*/
|
|
7
|
+
class Episode {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET episode/target/{releaseId}/{sourceId}/{position}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IEpisodeResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.episode.episodeTarget(1, 1, 1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async episodeTarget(releaseId, sourceId, position, options) {
|
|
21
|
+
return await this.client.call({ path: `/episode/target/${releaseId}/${sourceId}/${position}`, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET episode/{releaseId}/{typeId}/{sourceId}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IEpisodesResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.episode.episodes(1, 1, 1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async episodes(releaseId, typeId, sourceId, query, options) {
|
|
33
|
+
return await this.client.call({ path: `/episode/${releaseId}/${typeId}/${sourceId}`, queryParams: query, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET episode/{releaseId}/{typeId}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link ISourcesResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.episode.sources(1, 1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async sources(releaseId, typeId, options) {
|
|
45
|
+
return await this.client.call({ path: `/episode/${releaseId}/${typeId}`, ...options });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* GET episode/{releaseId}
|
|
49
|
+
*
|
|
50
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
51
|
+
* @returns {@link ITypeResponse}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const result = await client.endpoints.episode.types(1, ...);
|
|
55
|
+
*/
|
|
56
|
+
async types(releaseId, options) {
|
|
57
|
+
return await this.client.call({ path: `/episode/${releaseId}`, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* POST episode/unwatch/{releaseId}/{sourceId}/{position}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IEpisodeUnwatchResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.episode.unwatch(1, 1, 1, ...);
|
|
67
|
+
*/
|
|
68
|
+
async unwatch(releaseId, sourceId, position, options) {
|
|
69
|
+
return await this.client.call({ path: `/episode/unwatch/${releaseId}/${sourceId}/${position}`, method: 'POST', ...options });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* POST episode/unwatch/{releaseId}/{sourceId}
|
|
73
|
+
*
|
|
74
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
75
|
+
* @returns {@link IEpisodeUnwatchResponse}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* const result = await client.endpoints.episode.unwatch2(1, 1, ...);
|
|
79
|
+
*/
|
|
80
|
+
async unwatch2(releaseId, sourceId, options) {
|
|
81
|
+
return await this.client.call({ path: `/episode/unwatch/${releaseId}/${sourceId}`, method: 'POST', ...options });
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* GET episode/updates/{releaseId}/{page}
|
|
85
|
+
*
|
|
86
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
87
|
+
* @returns {@link IPageableResponse}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* const result = await client.endpoints.episode.updates(1, 1, ...);
|
|
91
|
+
*/
|
|
92
|
+
async updates(releaseId, page, options) {
|
|
93
|
+
return await this.client.call({ path: `/episode/updates/${releaseId}/${page}`, ...options });
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* POST episode/watch/{releaseId}/{sourceId}/{position}
|
|
97
|
+
*
|
|
98
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
99
|
+
* @returns {@link IEpisodeWatchResponse}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* const result = await client.endpoints.episode.watch(1, 1, 1, ...);
|
|
103
|
+
*/
|
|
104
|
+
async watch(releaseId, sourceId, position, options) {
|
|
105
|
+
return await this.client.call({ path: `/episode/watch/${releaseId}/${sourceId}/${position}`, method: 'POST', ...options });
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* POST episode/watch/{releaseId}/{sourceId}
|
|
109
|
+
*
|
|
110
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
111
|
+
* @returns {@link IEpisodeWatchResponse}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* const result = await client.endpoints.episode.watch2(1, 1, ...);
|
|
115
|
+
*/
|
|
116
|
+
async watch2(releaseId, sourceId, options) {
|
|
117
|
+
return await this.client.call({ path: `/episode/watch/${releaseId}/${sourceId}`, method: 'POST', ...options });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.Episode = Episode;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, IFavoritesResponse, IPageableResponse, IRelease } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами избранного
|
|
5
|
+
*/
|
|
6
|
+
export declare class Favorite {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET favorite/add/{r_id}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IFavoritesResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.favorite.add(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
add(id2: number, options?: IBaseApiParams): Promise<IFavoritesResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET favorite/delete/{r_id}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IFavoritesResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.favorite.delete(1, ...);
|
|
27
|
+
*/
|
|
28
|
+
delete(id2: number, options?: IBaseApiParams): Promise<IFavoritesResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* GET favorite/all/{page}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.favorite.favorites(1, ...);
|
|
37
|
+
*/
|
|
38
|
+
favorites(page: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Favorite = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами избранного
|
|
6
|
+
*/
|
|
7
|
+
class Favorite {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET favorite/add/{r_id}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IFavoritesResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.favorite.add(1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async add(id2, options) {
|
|
21
|
+
return await this.client.call({ path: `/favorite/add/${id2}`, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET favorite/delete/{r_id}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IFavoritesResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.favorite.delete(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async delete(id2, options) {
|
|
33
|
+
return await this.client.call({ path: `/favorite/delete/${id2}`, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET favorite/all/{page}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link IPageableResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.favorite.favorites(1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async favorites(page, query, options) {
|
|
45
|
+
return await this.client.call({ path: `/favorite/all/${page}`, queryParams: query, ...options });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.Favorite = Favorite;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, IPageableResponse, IRelease, IReleaseFilterRequest } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами фильтра
|
|
5
|
+
*/
|
|
6
|
+
export declare class Filter {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* POST filter/{page}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IPageableResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.filter.filter(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
filter(page: number, body: IReleaseFilterRequest, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Filter = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами фильтра
|
|
6
|
+
*/
|
|
7
|
+
class Filter {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* POST filter/{page}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IPageableResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.filter.filter(1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async filter(page, body, query, options) {
|
|
21
|
+
return await this.client.call({ path: `/filter/${page}`, method: 'POST', queryParams: query, json: body, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Filter = Filter;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, IHistoryResponse, IPageableResponse, IRelease } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами истории просмотра
|
|
5
|
+
*/
|
|
6
|
+
export declare class History {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET history/add/{r_id}/{s_id}/{position}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IHistoryResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.history.add(1, 1, 1, ...);
|
|
17
|
+
*/
|
|
18
|
+
add(releaseId: number, sourceId: number, position: number, options?: IBaseApiParams): Promise<IHistoryResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET history/delete/{r_id}
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IHistoryResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.history.delete(1, ...);
|
|
27
|
+
*/
|
|
28
|
+
delete(id2: number, options?: IBaseApiParams): Promise<IHistoryResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* GET history/{page}
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IPageableResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.history.history(1, ...);
|
|
37
|
+
*/
|
|
38
|
+
history(page: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.History = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами истории просмотра
|
|
6
|
+
*/
|
|
7
|
+
class History {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET history/add/{r_id}/{s_id}/{position}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IHistoryResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.history.add(1, 1, 1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async add(releaseId, sourceId, position, options) {
|
|
21
|
+
return await this.client.call({ path: `/history/add/${releaseId}/${sourceId}/${position}`, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* GET history/delete/{r_id}
|
|
25
|
+
*
|
|
26
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
27
|
+
* @returns {@link IHistoryResponse}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const result = await client.endpoints.history.delete(1, ...);
|
|
31
|
+
*/
|
|
32
|
+
async delete(id2, options) {
|
|
33
|
+
return await this.client.call({ path: `/history/delete/${id2}`, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET history/{page}
|
|
37
|
+
*
|
|
38
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
39
|
+
* @returns {@link IPageableResponse}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const result = await client.endpoints.history.history(1, ...);
|
|
43
|
+
*/
|
|
44
|
+
async history(page, options) {
|
|
45
|
+
return await this.client.call({ path: `/history/${page}`, ...options });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.History = History;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./release";
|
|
2
|
+
export * from "./episode";
|
|
3
|
+
export * from "./releaseComment";
|
|
4
|
+
export * from "./releaseVideo";
|
|
5
|
+
export * from "./releaseVideoAppeal";
|
|
6
|
+
export * from "./releaseVideoFavorite";
|
|
7
|
+
export * from "./releaseStreamingPlatform";
|
|
8
|
+
export * from "./related";
|
|
9
|
+
export * from "./filter";
|
|
10
|
+
export * from "./history";
|
|
11
|
+
export * from "./favorite";
|
|
12
|
+
export * from "./schedule";
|
|
13
|
+
export * from "./type";
|
|
@@ -0,0 +1,29 @@
|
|
|
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("./release"), exports);
|
|
18
|
+
__exportStar(require("./episode"), exports);
|
|
19
|
+
__exportStar(require("./releaseComment"), exports);
|
|
20
|
+
__exportStar(require("./releaseVideo"), exports);
|
|
21
|
+
__exportStar(require("./releaseVideoAppeal"), exports);
|
|
22
|
+
__exportStar(require("./releaseVideoFavorite"), exports);
|
|
23
|
+
__exportStar(require("./releaseStreamingPlatform"), exports);
|
|
24
|
+
__exportStar(require("./related"), exports);
|
|
25
|
+
__exportStar(require("./filter"), exports);
|
|
26
|
+
__exportStar(require("./history"), exports);
|
|
27
|
+
__exportStar(require("./favorite"), exports);
|
|
28
|
+
__exportStar(require("./schedule"), exports);
|
|
29
|
+
__exportStar(require("./type"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, IPageableResponse, IRelease } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами похожих релизов
|
|
5
|
+
*/
|
|
6
|
+
export declare class Related {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET related/{relatedId}/{page}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IPageableResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.related.related(1, 1, ...);
|
|
17
|
+
*/
|
|
18
|
+
related(relatedId: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Related = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Класс с эндпоинтами похожих релизов
|
|
6
|
+
*/
|
|
7
|
+
class Related {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET related/{relatedId}/{page}
|
|
13
|
+
*
|
|
14
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
15
|
+
* @returns {@link IPageableResponse}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const result = await client.endpoints.related.related(1, 1, ...);
|
|
19
|
+
*/
|
|
20
|
+
async related(relatedId, page, options) {
|
|
21
|
+
return await this.client.call({ path: `/related/${relatedId}/${page}`, apiV2: true, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Related = Related;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Anixart } from "../../client";
|
|
2
|
+
import { IBaseApiParams, IReleaseResponse, IResponse } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Класс с эндпоинтами релизов
|
|
5
|
+
*/
|
|
6
|
+
export declare class Release {
|
|
7
|
+
private readonly client;
|
|
8
|
+
constructor(client: Anixart);
|
|
9
|
+
/**
|
|
10
|
+
* GET release/vote/delete/{r_id}
|
|
11
|
+
*
|
|
12
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
13
|
+
* @returns {@link IResponse}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const result = await client.endpoints.release.deleteVote(1, ...);
|
|
17
|
+
*/
|
|
18
|
+
deleteVote(id2: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* GET release/random
|
|
21
|
+
*
|
|
22
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
23
|
+
* @returns {@link IReleaseResponse}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const result = await client.endpoints.release.random(...);
|
|
27
|
+
*/
|
|
28
|
+
random(query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* GET release/collection/{id}/random
|
|
31
|
+
*
|
|
32
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
33
|
+
* @returns {@link IReleaseResponse}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await client.endpoints.release.randomCollection(1, ...);
|
|
37
|
+
*/
|
|
38
|
+
randomCollection(collectionId: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* GET release/random/favorite
|
|
41
|
+
*
|
|
42
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
43
|
+
* @returns {@link IReleaseResponse}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const result = await client.endpoints.release.randomFavorite(...);
|
|
47
|
+
*/
|
|
48
|
+
randomFavorite(query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* GET release/random/profile/list/{p_id}/{status}
|
|
51
|
+
*
|
|
52
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
53
|
+
* @returns {@link IReleaseResponse}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const result = await client.endpoints.release.randomProfileList(1, 1, ...);
|
|
57
|
+
*/
|
|
58
|
+
randomProfileList(profileId: number, status: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* GET release/{r_id}
|
|
61
|
+
*
|
|
62
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
63
|
+
* @returns {@link IReleaseResponse}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const result = await client.endpoints.release.release(1, ...);
|
|
67
|
+
*/
|
|
68
|
+
release(id2: number, query?: Record<string, string | number | boolean | undefined>, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* GET release/vote/add/{r_id}/{vote}
|
|
71
|
+
*
|
|
72
|
+
* Возможные коды ответа: {@link DefaultResult}
|
|
73
|
+
* @returns {@link IResponse}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* const result = await client.endpoints.release.vote(1, 1, ...);
|
|
77
|
+
*/
|
|
78
|
+
vote(id2: number, vote: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
79
|
+
}
|