anixartjs 0.1.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +617 -282
- package/README.md +404 -118
- package/dist/api/article/article.d.ts +422 -0
- package/dist/api/article/article.d.ts.map +1 -0
- package/dist/api/article/article.js +572 -0
- package/dist/api/article/article.js.map +1 -0
- package/dist/api/article/articleComment.d.ts +297 -0
- package/dist/api/article/articleComment.d.ts.map +1 -0
- package/dist/api/article/articleComment.js +398 -0
- package/dist/api/article/articleComment.js.map +1 -0
- package/dist/api/article/articleSuggestion.d.ts +212 -0
- package/dist/api/article/articleSuggestion.d.ts.map +1 -0
- package/dist/api/article/articleSuggestion.js +280 -0
- package/dist/api/article/articleSuggestion.js.map +1 -0
- package/dist/api/auth.d.ts +452 -65
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +652 -92
- package/dist/api/auth.js.map +1 -0
- package/dist/api/channel.d.ts +724 -47
- package/dist/api/channel.d.ts.map +1 -0
- package/dist/api/channel.js +970 -125
- package/dist/api/channel.js.map +1 -0
- package/dist/api/collection/collection.d.ts +143 -0
- package/dist/api/collection/collection.d.ts.map +1 -0
- package/dist/api/collection/collection.js +191 -0
- package/dist/api/collection/collection.js.map +1 -0
- package/dist/api/collection/collectionComment.d.ts +274 -0
- package/dist/api/collection/collectionComment.d.ts.map +1 -0
- package/dist/api/collection/collectionComment.js +368 -0
- package/dist/api/collection/collectionComment.js.map +1 -0
- package/dist/api/collection/collectionFavorite.d.ts +87 -0
- package/dist/api/collection/collectionFavorite.d.ts.map +1 -0
- package/dist/api/collection/collectionFavorite.js +114 -0
- package/dist/api/collection/collectionFavorite.js.map +1 -0
- package/dist/api/collection/collectionMy.d.ts +193 -0
- package/dist/api/collection/collectionMy.d.ts.map +1 -0
- package/dist/api/collection/collectionMy.js +266 -0
- package/dist/api/collection/collectionMy.js.map +1 -0
- package/dist/api/config.d.ts +83 -0
- package/dist/api/config.d.ts.map +1 -0
- package/dist/api/config.js +115 -0
- package/dist/api/config.js.map +1 -0
- package/dist/api/discover.d.ts +75 -46
- package/dist/api/discover.d.ts.map +1 -0
- package/dist/api/discover.js +104 -49
- package/dist/api/discover.js.map +1 -0
- package/dist/api/export.d.ts +41 -0
- package/dist/api/export.d.ts.map +1 -0
- package/dist/api/export.js +60 -0
- package/dist/api/export.js.map +1 -0
- package/dist/api/feed.d.ts +64 -20
- package/dist/api/feed.d.ts.map +1 -0
- package/dist/api/feed.js +85 -20
- package/dist/api/feed.js.map +1 -0
- package/dist/api/import.d.ts +65 -0
- package/dist/api/import.d.ts.map +1 -0
- package/dist/api/import.js +89 -0
- package/dist/api/import.js.map +1 -0
- package/dist/api/notification/notification.d.ts +284 -0
- package/dist/api/notification/notification.d.ts.map +1 -0
- package/dist/api/notification/notification.js +371 -0
- package/dist/api/notification/notification.js.map +1 -0
- package/dist/api/notification/notificationPreference.d.ts +188 -0
- package/dist/api/notification/notificationPreference.d.ts.map +1 -0
- package/dist/api/notification/notificationPreference.js +252 -0
- package/dist/api/notification/notificationPreference.js.map +1 -0
- package/dist/api/profile/profile.d.ts +99 -0
- package/dist/api/profile/profile.d.ts.map +1 -0
- package/dist/api/profile/profile.js +132 -0
- package/dist/api/profile/profile.js.map +1 -0
- package/dist/api/profile/profileBadge.d.ts +79 -0
- package/dist/api/profile/profileBadge.d.ts.map +1 -0
- package/dist/api/profile/profileBadge.js +103 -0
- package/dist/api/profile/profileBadge.js.map +1 -0
- package/dist/api/profile/profileBlockList.d.ts +85 -0
- package/dist/api/profile/profileBlockList.d.ts.map +1 -0
- package/dist/api/profile/profileBlockList.js +111 -0
- package/dist/api/profile/profileBlockList.js.map +1 -0
- package/dist/api/profile/profileDeletion.d.ts +81 -0
- package/dist/api/profile/profileDeletion.d.ts.map +1 -0
- package/dist/api/profile/profileDeletion.js +115 -0
- package/dist/api/profile/profileDeletion.js.map +1 -0
- package/dist/api/profile/profileFriend.d.ts +184 -0
- package/dist/api/profile/profileFriend.d.ts.map +1 -0
- package/dist/api/profile/profileFriend.js +244 -0
- package/dist/api/profile/profileFriend.js.map +1 -0
- package/dist/api/profile/profileHealth.d.ts +124 -0
- package/dist/api/profile/profileHealth.d.ts.map +1 -0
- package/dist/api/profile/profileHealth.js +168 -0
- package/dist/api/profile/profileHealth.js.map +1 -0
- package/dist/api/profile/profileList.d.ts +135 -0
- package/dist/api/profile/profileList.d.ts.map +1 -0
- package/dist/api/profile/profileList.js +174 -0
- package/dist/api/profile/profileList.js.map +1 -0
- package/dist/api/profile/profilePreference.d.ts +692 -0
- package/dist/api/profile/profilePreference.d.ts.map +1 -0
- package/dist/api/profile/profilePreference.js +1014 -0
- package/dist/api/profile/profilePreference.js.map +1 -0
- package/dist/api/profile/profileReleaseVote.d.ts +81 -0
- package/dist/api/profile/profileReleaseVote.d.ts.map +1 -0
- package/dist/api/profile/profileReleaseVote.js +108 -0
- package/dist/api/profile/profileReleaseVote.js.map +1 -0
- package/dist/api/profile/profileRoleList.d.ts +34 -0
- package/dist/api/profile/profileRoleList.d.ts.map +1 -0
- package/dist/api/profile/profileRoleList.js +44 -0
- package/dist/api/profile/profileRoleList.js.map +1 -0
- package/dist/api/release/episode.d.ts +254 -0
- package/dist/api/release/episode.d.ts.map +1 -0
- package/dist/api/release/episode.js +260 -0
- package/dist/api/release/episode.js.map +1 -0
- package/dist/api/release/favorite.d.ts +89 -0
- package/dist/api/release/favorite.d.ts.map +1 -0
- package/dist/api/release/favorite.js +117 -0
- package/dist/api/release/favorite.js.map +1 -0
- package/dist/api/release/filter.d.ts +44 -0
- package/dist/api/release/filter.d.ts.map +1 -0
- package/dist/api/release/filter.js +61 -0
- package/dist/api/release/filter.js.map +1 -0
- package/dist/api/release/history.d.ts +89 -0
- package/dist/api/release/history.d.ts.map +1 -0
- package/dist/api/release/history.js +113 -0
- package/dist/api/release/history.js.map +1 -0
- package/dist/api/release/related.d.ts +34 -0
- package/dist/api/release/related.d.ts.map +1 -0
- package/dist/api/release/related.js +46 -0
- package/dist/api/release/related.js.map +1 -0
- package/dist/api/release/release.d.ts +192 -0
- package/dist/api/release/release.d.ts.map +1 -0
- package/dist/api/release/release.js +259 -0
- package/dist/api/release/release.js.map +1 -0
- package/dist/api/release/releaseComment.d.ts +282 -0
- package/dist/api/release/releaseComment.d.ts.map +1 -0
- package/dist/api/release/releaseComment.js +376 -0
- package/dist/api/release/releaseComment.js.map +1 -0
- package/dist/api/release/releaseStreamingPlatform.d.ts +29 -0
- package/dist/api/release/releaseStreamingPlatform.d.ts.map +1 -0
- package/dist/api/release/releaseStreamingPlatform.js +38 -0
- package/dist/api/release/releaseStreamingPlatform.js.map +1 -0
- package/dist/api/release/releaseVideo.d.ts +125 -0
- package/dist/api/release/releaseVideo.d.ts.map +1 -0
- package/dist/api/release/releaseVideo.js +161 -0
- package/dist/api/release/releaseVideo.js.map +1 -0
- package/dist/api/release/releaseVideoAppeal.d.ts +93 -0
- package/dist/api/release/releaseVideoAppeal.d.ts.map +1 -0
- package/dist/api/release/releaseVideoAppeal.js +124 -0
- package/dist/api/release/releaseVideoAppeal.js.map +1 -0
- package/dist/api/release/releaseVideoFavorite.d.ts +86 -0
- package/dist/api/release/releaseVideoFavorite.d.ts.map +1 -0
- package/dist/api/release/releaseVideoFavorite.js +110 -0
- package/dist/api/release/releaseVideoFavorite.js.map +1 -0
- package/dist/api/release/schedule.d.ts +25 -0
- package/dist/api/release/schedule.d.ts.map +1 -0
- package/dist/api/release/schedule.js +34 -0
- package/dist/api/release/schedule.js.map +1 -0
- package/dist/api/report.d.ts +68 -0
- package/dist/api/report.d.ts.map +1 -0
- package/dist/api/report.js +91 -0
- package/dist/api/report.js.map +1 -0
- package/dist/api/search.d.ts +360 -216
- package/dist/api/search.d.ts.map +1 -0
- package/dist/api/search.js +482 -226
- package/dist/api/search.js.map +1 -0
- package/dist/api/type.d.ts +159 -0
- package/dist/api/type.d.ts.map +1 -0
- package/dist/api/type.js +207 -0
- package/dist/api/type.js.map +1 -0
- package/dist/core/anixartClient.d.ts +25 -0
- package/dist/core/anixartClient.d.ts.map +1 -0
- package/dist/core/anixartClient.js +35 -0
- package/dist/core/anixartClient.js.map +1 -0
- package/dist/core/endpoints.d.ts +87 -0
- package/dist/core/endpoints.d.ts.map +1 -0
- package/dist/core/endpoints.js +132 -0
- package/dist/core/endpoints.js.map +1 -0
- package/dist/core/errors/anixartError.d.ts +8 -0
- package/dist/core/errors/anixartError.d.ts.map +1 -0
- package/dist/core/errors/anixartError.js +19 -0
- package/dist/core/errors/anixartError.js.map +1 -0
- package/dist/core/errors/httpError.d.ts +6 -0
- package/dist/core/errors/httpError.d.ts.map +1 -0
- package/dist/core/errors/httpError.js +15 -0
- package/dist/core/errors/httpError.js.map +1 -0
- package/dist/core/http/httpClient.d.ts +15 -0
- package/dist/core/http/httpClient.d.ts.map +1 -0
- package/dist/core/http/httpClient.js +153 -0
- package/dist/core/http/httpClient.js.map +1 -0
- package/dist/core/http/httpTypes.d.ts +49 -0
- package/dist/core/http/httpTypes.d.ts.map +1 -0
- package/dist/core/http/httpTypes.js +3 -0
- package/dist/core/http/httpTypes.js.map +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -0
- package/dist/models/article/enums.d.ts +51 -0
- package/dist/models/article/enums.d.ts.map +1 -0
- package/dist/models/article/enums.js +62 -0
- package/dist/models/article/enums.js.map +1 -0
- package/dist/models/article/types.d.ts +167 -0
- package/dist/models/article/types.d.ts.map +1 -0
- package/dist/{types/notification.js → models/article/types.js} +1 -0
- package/dist/models/article/types.js.map +1 -0
- package/dist/models/auth/enums.d.ts +139 -0
- package/dist/models/auth/enums.d.ts.map +1 -0
- package/dist/models/auth/enums.js +159 -0
- package/dist/models/auth/enums.js.map +1 -0
- package/dist/models/auth/types.d.ts +95 -0
- package/dist/models/auth/types.d.ts.map +1 -0
- package/dist/{types/request.js → models/auth/types.js} +1 -0
- package/dist/models/auth/types.js.map +1 -0
- package/dist/models/channel/enums.d.ts +63 -0
- package/dist/models/channel/enums.d.ts.map +1 -0
- package/dist/models/channel/enums.js +79 -0
- package/dist/models/channel/enums.js.map +1 -0
- package/dist/models/channel/types.d.ts +129 -0
- package/dist/models/channel/types.d.ts.map +1 -0
- package/dist/models/channel/types.js +3 -0
- package/dist/models/channel/types.js.map +1 -0
- package/dist/models/collection/enums.d.ts +39 -0
- package/dist/models/collection/enums.d.ts.map +1 -0
- package/dist/{types/collection.js → models/collection/enums.js} +6 -1
- package/dist/models/collection/enums.js.map +1 -0
- package/dist/models/collection/types.d.ts +54 -0
- package/dist/models/collection/types.d.ts.map +1 -0
- package/dist/models/collection/types.js +3 -0
- package/dist/models/collection/types.js.map +1 -0
- package/dist/models/common/enums.d.ts +29 -0
- package/dist/models/common/enums.d.ts.map +1 -0
- package/dist/{types/response.js → models/common/enums.js} +10 -9
- package/dist/models/common/enums.js.map +1 -0
- package/dist/models/common/types.d.ts +52 -0
- package/dist/models/common/types.d.ts.map +1 -0
- package/dist/models/common/types.js +3 -0
- package/dist/models/common/types.js.map +1 -0
- package/dist/models/config/types.d.ts +66 -0
- package/dist/models/config/types.d.ts.map +1 -0
- package/dist/models/config/types.js +3 -0
- package/dist/models/config/types.js.map +1 -0
- package/dist/models/index.d.ts +23 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +39 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/notification/enums.d.ts +26 -0
- package/dist/models/notification/enums.d.ts.map +1 -0
- package/dist/models/notification/enums.js +32 -0
- package/dist/models/notification/enums.js.map +1 -0
- package/dist/models/notification/types.d.ts +66 -0
- package/dist/models/notification/types.d.ts.map +1 -0
- package/dist/models/notification/types.js +3 -0
- package/dist/models/notification/types.js.map +1 -0
- package/dist/models/preference/enums.d.ts +79 -0
- package/dist/models/preference/enums.d.ts.map +1 -0
- package/dist/models/preference/enums.js +99 -0
- package/dist/models/preference/enums.js.map +1 -0
- package/dist/models/preference/types.d.ts +61 -0
- package/dist/models/preference/types.d.ts.map +1 -0
- package/dist/models/preference/types.js +3 -0
- package/dist/models/preference/types.js.map +1 -0
- package/dist/models/profile/enums.d.ts +68 -0
- package/dist/models/profile/enums.d.ts.map +1 -0
- package/dist/models/profile/enums.js +83 -0
- package/dist/models/profile/enums.js.map +1 -0
- package/dist/{types/profile.d.ts → models/profile/types.d.ts} +157 -160
- package/dist/models/profile/types.d.ts.map +1 -0
- package/dist/models/profile/types.js +3 -0
- package/dist/models/profile/types.js.map +1 -0
- package/dist/models/release/enums.d.ts +57 -0
- package/dist/models/release/enums.d.ts.map +1 -0
- package/dist/models/release/enums.js +69 -0
- package/dist/models/release/enums.js.map +1 -0
- package/dist/models/release/types.d.ts +283 -0
- package/dist/models/release/types.d.ts.map +1 -0
- package/dist/models/release/types.js +3 -0
- package/dist/models/release/types.js.map +1 -0
- package/dist/models/report/enums.d.ts +17 -0
- package/dist/models/report/enums.d.ts.map +1 -0
- package/dist/models/report/enums.js +22 -0
- package/dist/models/report/enums.js.map +1 -0
- package/dist/models/report/types.d.ts +23 -0
- package/dist/models/report/types.d.ts.map +1 -0
- package/dist/models/report/types.js +4 -0
- package/dist/models/report/types.js.map +1 -0
- package/dist/models/search/types.d.ts +27 -0
- package/dist/models/search/types.d.ts.map +1 -0
- package/dist/models/search/types.js +3 -0
- package/dist/models/search/types.js.map +1 -0
- package/dist/utils/ArticleBuilder.d.ts +41 -12
- package/dist/utils/ArticleBuilder.d.ts.map +1 -0
- package/dist/utils/ArticleBuilder.js +130 -115
- package/dist/utils/ArticleBuilder.js.map +1 -0
- package/dist/utils/linkParser/anilibria.d.ts +146 -0
- package/dist/utils/linkParser/anilibria.d.ts.map +1 -0
- package/dist/utils/linkParser/anilibria.js +42 -0
- package/dist/utils/linkParser/anilibria.js.map +1 -0
- package/dist/utils/linkParser/index.d.ts +9 -0
- package/dist/utils/linkParser/index.d.ts.map +1 -0
- package/dist/utils/linkParser/index.js +29 -0
- package/dist/utils/linkParser/index.js.map +1 -0
- package/dist/utils/linkParser/kodik.d.ts +50 -0
- package/dist/utils/linkParser/kodik.d.ts.map +1 -0
- package/dist/utils/linkParser/kodik.js +86 -0
- package/dist/utils/linkParser/kodik.js.map +1 -0
- package/dist/utils/linkParser/ok.d.ts +9 -0
- package/dist/utils/linkParser/ok.d.ts.map +1 -0
- package/dist/utils/linkParser/ok.js +62 -0
- package/dist/utils/linkParser/ok.js.map +1 -0
- package/dist/utils/linkParser/parseHlsMaster.d.ts +6 -0
- package/dist/utils/linkParser/parseHlsMaster.d.ts.map +1 -0
- package/dist/utils/linkParser/parseHlsMaster.js +57 -0
- package/dist/utils/linkParser/parseHlsMaster.js.map +1 -0
- package/dist/utils/linkParser/request.d.ts +7 -0
- package/dist/utils/linkParser/request.d.ts.map +1 -0
- package/dist/utils/linkParser/request.js +50 -0
- package/dist/utils/linkParser/request.js.map +1 -0
- package/dist/utils/linkParser/rutube.d.ts +8 -0
- package/dist/utils/linkParser/rutube.d.ts.map +1 -0
- package/dist/utils/linkParser/rutube.js +28 -0
- package/dist/utils/linkParser/rutube.js.map +1 -0
- package/dist/utils/linkParser/sibnet.d.ts +8 -0
- package/dist/utils/linkParser/sibnet.d.ts.map +1 -0
- package/dist/utils/linkParser/sibnet.js +26 -0
- package/dist/utils/linkParser/sibnet.js.map +1 -0
- package/dist/utils/linkParser/types.d.ts +12 -0
- package/dist/utils/linkParser/types.d.ts.map +1 -0
- package/dist/utils/linkParser/types.js +3 -0
- package/dist/utils/linkParser/types.js.map +1 -0
- package/dist/utils/linkParser/vk.d.ts +13 -0
- package/dist/utils/linkParser/vk.d.ts.map +1 -0
- package/dist/utils/linkParser/vk.js +58 -0
- package/dist/utils/linkParser/vk.js.map +1 -0
- package/package.json +5 -5
- package/dist/api/collection.d.ts +0 -27
- package/dist/api/collection.js +0 -62
- package/dist/api/index.d.ts +0 -10
- package/dist/api/index.js +0 -26
- package/dist/api/notification.d.ts +0 -17
- package/dist/api/notification.js +0 -42
- package/dist/api/profile.d.ts +0 -463
- package/dist/api/profile.js +0 -590
- package/dist/api/release.d.ts +0 -41
- package/dist/api/release.js +0 -104
- package/dist/api/settings.d.ts +0 -29
- package/dist/api/settings.js +0 -78
- package/dist/classes/Article.d.ts +0 -18
- package/dist/classes/Article.js +0 -44
- package/dist/classes/ArticleComment.d.ts +0 -15
- package/dist/classes/ArticleComment.js +0 -37
- package/dist/classes/BaseArticle.d.ts +0 -21
- package/dist/classes/BaseArticle.js +0 -23
- package/dist/classes/BaseComment.d.ts +0 -22
- package/dist/classes/BaseComment.js +0 -25
- package/dist/classes/BaseProfile.d.ts +0 -29
- package/dist/classes/BaseProfile.js +0 -50
- package/dist/classes/Channel.d.ts +0 -47
- package/dist/classes/Channel.js +0 -104
- package/dist/classes/Collection.d.ts +0 -29
- package/dist/classes/Collection.js +0 -58
- package/dist/classes/Dubber.d.ts +0 -19
- package/dist/classes/Dubber.js +0 -24
- package/dist/classes/Episode.d.ts +0 -20
- package/dist/classes/Episode.js +0 -30
- package/dist/classes/FullProfile.d.ts +0 -70
- package/dist/classes/FullProfile.js +0 -92
- package/dist/classes/Release.d.ts +0 -91
- package/dist/classes/Release.js +0 -154
- package/dist/classes/ReleaseComment.d.ts +0 -16
- package/dist/classes/ReleaseComment.js +0 -45
- package/dist/classes/Source.d.ts +0 -15
- package/dist/classes/Source.js +0 -20
- package/dist/classes/SuggestionArticle.d.ts +0 -14
- package/dist/classes/SuggestionArticle.js +0 -29
- package/dist/client.d.ts +0 -46
- package/dist/client.js +0 -149
- package/dist/endpoints.d.ts +0 -27
- package/dist/endpoints.js +0 -34
- package/dist/types/auth.d.ts +0 -64
- package/dist/types/auth.js +0 -47
- package/dist/types/channel.d.ts +0 -288
- package/dist/types/channel.js +0 -104
- package/dist/types/collection.d.ts +0 -84
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.js +0 -25
- package/dist/types/notification.d.ts +0 -36
- package/dist/types/profile.js +0 -46
- package/dist/types/release.d.ts +0 -336
- package/dist/types/release.js +0 -39
- package/dist/types/request.d.ts +0 -36
- package/dist/types/response.d.ts +0 -77
- package/dist/types/settings.d.ts +0 -89
- package/dist/types/settings.js +0 -48
- package/dist/utils/LinkParser.d.ts +0 -253
- package/dist/utils/LinkParser.js +0 -253
- package/dist/utils/Utils.d.ts +0 -3
- package/dist/utils/Utils.js +0 -11
package/dist/api/profile.js
DELETED
|
@@ -1,590 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Profile = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Класс профиля
|
|
6
|
-
*
|
|
7
|
-
* TODO: Понять для чего нужен эндпоинт '/profile/process/{id}' - POST
|
|
8
|
-
* Пока что предположение что это что-то для модерации
|
|
9
|
-
*/
|
|
10
|
-
class Profile {
|
|
11
|
-
constructor(client) {
|
|
12
|
-
this.client = client;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Получение информация о профиле по его ID
|
|
16
|
-
*
|
|
17
|
-
* Возвращает {@link IProfileResponse}.
|
|
18
|
-
*
|
|
19
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
20
|
-
*
|
|
21
|
-
* @param id - ID Профиля
|
|
22
|
-
* @param options - Дополнительные параметры
|
|
23
|
-
* @returns Информацию о профиле с указанным ID
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* const result = await client.endpoints.profile.info(1);
|
|
27
|
-
*/
|
|
28
|
-
async info(id, options) {
|
|
29
|
-
return this.client.call({
|
|
30
|
-
path: `/profile/${id}`,
|
|
31
|
-
...options,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Получение закладок из профиля по его ID
|
|
36
|
-
*
|
|
37
|
-
* Возвращает {@link IRelease} внутри {@link IPageableResponse}.
|
|
38
|
-
*
|
|
39
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
40
|
-
*
|
|
41
|
-
* @param data - Данные для запроса
|
|
42
|
-
* @param options - Дополнительные параметры
|
|
43
|
-
* @returns Информацию о релизах которые находятся в закладке
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* const { BookmarkType, BookmarkSortType } = require("anixartjs");
|
|
47
|
-
*
|
|
48
|
-
* const result = await client.endpoints.profile.getBookmarks({
|
|
49
|
-
* type: BookmarkType.Watching, //Тип закладки
|
|
50
|
-
* id: 1, //ID профиля
|
|
51
|
-
* sort: BookmarkSortType.NewToOldAddTime, //Сортировка
|
|
52
|
-
* page: 0 //Страница
|
|
53
|
-
* });
|
|
54
|
-
*/
|
|
55
|
-
async getBookmarks(data, options) {
|
|
56
|
-
return this.client.call({
|
|
57
|
-
path: `/profile/list/all/${data.id ? `${data.id}/` : ""}${data.type}/${data.page}`,
|
|
58
|
-
queryParams: {
|
|
59
|
-
sort: data.sort,
|
|
60
|
-
filter: data.filter,
|
|
61
|
-
filter_announce: data.filter_announce,
|
|
62
|
-
},
|
|
63
|
-
...options,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Добавление релиза в закладку
|
|
68
|
-
*
|
|
69
|
-
* Возвращает код результата {@link IResponse}.
|
|
70
|
-
*
|
|
71
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
72
|
-
*
|
|
73
|
-
* @param id - ID релиза
|
|
74
|
-
* @param type - Тип закладки {@link BookmarkType}
|
|
75
|
-
* @param options - Дополнительные параметры
|
|
76
|
-
* @returns Ответ API в виде числа
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* const { BookmarkType } = require("anixartjs");
|
|
80
|
-
*
|
|
81
|
-
* const result = await client.endpoints.profile.addBookmarks(1, BookmarkType.Watching);
|
|
82
|
-
*/
|
|
83
|
-
async addBookmark(id, type, options) {
|
|
84
|
-
return this.client.call({
|
|
85
|
-
path: `/profile/list/add/${type}/${id}`,
|
|
86
|
-
...options,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Удаление релиза из закладки
|
|
91
|
-
*
|
|
92
|
-
* Возвращает код результата {@link IResponse}.
|
|
93
|
-
*
|
|
94
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
95
|
-
*
|
|
96
|
-
* @param id - ID релиза
|
|
97
|
-
* @param type - Тип закладки {@link BookmarkType}
|
|
98
|
-
* @param options - Дополнительные параметры
|
|
99
|
-
* @returns Ответ API в виде числа
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* const { BookmarkType } = require("anixartjs");
|
|
103
|
-
*
|
|
104
|
-
* const result = await client.endpoints.profile.removeBookmarks(1, BookmarkType.Watching);
|
|
105
|
-
*/
|
|
106
|
-
async removeBookmark(id, type, options) {
|
|
107
|
-
return this.client.call({
|
|
108
|
-
path: `/profile/list/delete/${type}/${id}`,
|
|
109
|
-
...options,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Получение друзей профиля по его ID
|
|
114
|
-
*
|
|
115
|
-
* Возвращает список {@link IProfileShort} внутри {@link IPageableResponse}.
|
|
116
|
-
*
|
|
117
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
118
|
-
*
|
|
119
|
-
* @param data - Данные для получения списка друзей
|
|
120
|
-
* @param options - Дополнительные параметры
|
|
121
|
-
* @returns Список друзей
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* const result = await client.endpoints.profile.getFriends({
|
|
125
|
-
* id: 1, //ID Профиля
|
|
126
|
-
* page: 0 //Страница
|
|
127
|
-
* });
|
|
128
|
-
*/
|
|
129
|
-
async getFriends(data, options) {
|
|
130
|
-
return await this.client.call({ path: `/profile/friend/all/${data.id}/${data.page}`, ...options });
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Получение списка рекомендаций для добавления в друзья
|
|
134
|
-
*
|
|
135
|
-
* Возвращает список {@link IProfileShort} внутри {@link IPageableResponse}.
|
|
136
|
-
*
|
|
137
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
138
|
-
*
|
|
139
|
-
* @param options - Дополнительные параметры
|
|
140
|
-
* @returns Список потенциальных друзей
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* const result = await client.endpoints.profile.getFriendRecomendation();
|
|
144
|
-
*/
|
|
145
|
-
async getFriendRecomendation(options) {
|
|
146
|
-
return await this.client.call({ path: `/profile/friend/recomendations`, ...options });
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Получение списка последних заявок в друзья
|
|
150
|
-
*
|
|
151
|
-
* Возвращает список {@link IProfileShort} внутри {@link IPageableResponse}.
|
|
152
|
-
*
|
|
153
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
154
|
-
*
|
|
155
|
-
* @param type - Тип заявок (Входящие или исходящие)
|
|
156
|
-
* @param count - Количество заявок
|
|
157
|
-
* @param options - Дополнительные параметры
|
|
158
|
-
* @returns Список последних заявок в друзья
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* const result = await client.endpoints.profile.getLastFriendRequests("in", 5);
|
|
162
|
-
*/
|
|
163
|
-
async getLastFriendRequests(type, count, options) {
|
|
164
|
-
return await this.client.call({
|
|
165
|
-
path: `/profile/friend/requests/${type}/last`,
|
|
166
|
-
queryParams: { count },
|
|
167
|
-
...options,
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Получение списка заявок в друзья
|
|
172
|
-
*
|
|
173
|
-
* Возвращает список {@link IProfileShort} внутри {@link IPageableResponse}.
|
|
174
|
-
*
|
|
175
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
176
|
-
*
|
|
177
|
-
* @param type - Тип заявок (Входящие или исходящие)
|
|
178
|
-
* @param page - Номер страницы
|
|
179
|
-
* @param options - Дополнительные параметры
|
|
180
|
-
* @returns Список заявок в друзья
|
|
181
|
-
*
|
|
182
|
-
* @example
|
|
183
|
-
* const result = await client.endpoints.profile.getFriendRequests("in", 0);
|
|
184
|
-
*/
|
|
185
|
-
async getFriendRequests(type, page, options) {
|
|
186
|
-
return await this.client.call({ path: `/profile/friend/requests/${type}/${page}`, ...options });
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Отправка запроса на добавление в друзья
|
|
190
|
-
*
|
|
191
|
-
* Возвращает ответ {@link IFriendRequestResponse}.
|
|
192
|
-
*
|
|
193
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}, {@link SendFriendRequestResult}
|
|
194
|
-
*
|
|
195
|
-
* @param id - ID Профиля
|
|
196
|
-
* @param options - Дополнительные параметры
|
|
197
|
-
* @returns Статус дружбы
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
* const result = await client.endpoints.profile.sendFriendRequest(1);
|
|
201
|
-
*/
|
|
202
|
-
async sendFriendRequest(id, options) {
|
|
203
|
-
return await this.client.call({ path: `/profile/friend/request/send/${id}`, ...options });
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Удаление запроса на добавление в друзья
|
|
207
|
-
*
|
|
208
|
-
* Возвращает ответ {@link IFriendRequestResponse}.
|
|
209
|
-
*
|
|
210
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}, {@link RemoveFriendRequestResult}
|
|
211
|
-
*
|
|
212
|
-
* @param id - ID Профиля
|
|
213
|
-
* @param options - Дополнительные параметры
|
|
214
|
-
* @returns Статус дружбы
|
|
215
|
-
*
|
|
216
|
-
* @example
|
|
217
|
-
* const result = await client.endpoints.profile.removeFriendRequest(1);
|
|
218
|
-
*/
|
|
219
|
-
async removeFriendRequest(id, options) {
|
|
220
|
-
return await this.client.call({ path: `/profile/friend/request/remove/${id}`, ...options });
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Скрытие запроса на добавление в друзья
|
|
224
|
-
*
|
|
225
|
-
* Возвращает ответ {@link IResponse}.
|
|
226
|
-
*
|
|
227
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
228
|
-
*
|
|
229
|
-
* @param id - ID Профиля
|
|
230
|
-
* @param options - Дополнительные параметры
|
|
231
|
-
* @returns Код ответа
|
|
232
|
-
*
|
|
233
|
-
* @example
|
|
234
|
-
* const result = await client.endpoints.profile.hideFriendRequest(1);
|
|
235
|
-
*/
|
|
236
|
-
async hideFriendRequest(id, options) {
|
|
237
|
-
return await this.client.call({
|
|
238
|
-
path: `/profile/friend/request/hide/${id}`,
|
|
239
|
-
...options,
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Получение достижения в профиль
|
|
244
|
-
*
|
|
245
|
-
* Возвращает ответ {@link IResponse}.
|
|
246
|
-
*
|
|
247
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}, {@link AchivementResult}
|
|
248
|
-
*
|
|
249
|
-
* @param id - ID Достижения
|
|
250
|
-
* @param options - Дополнительные параметры
|
|
251
|
-
* @returns Код ответа
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* const result = await client.endpoints.profile.getAchivement("DEMO1-ACHIV-MENT2");
|
|
255
|
-
* //Или
|
|
256
|
-
* const result = await client.endpoints.profile.getAchivement(1);
|
|
257
|
-
*/
|
|
258
|
-
async getAchivement(id, options) {
|
|
259
|
-
return await this.client.call({ path: `/achivement/get/${id}`, ...options });
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Получение избранных релизов в профиле
|
|
263
|
-
*
|
|
264
|
-
* Возвращает релизы {@link IRelease} внутри {@link IPageableResponse}.
|
|
265
|
-
*
|
|
266
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
267
|
-
*
|
|
268
|
-
* @param data - Данные для запроса
|
|
269
|
-
* @param options - Дополнительные параметры
|
|
270
|
-
* @returns Релизы
|
|
271
|
-
*
|
|
272
|
-
* @example
|
|
273
|
-
* const { BookmarkSortType } = require("anixartjs");
|
|
274
|
-
*
|
|
275
|
-
* const result = await client.endpoints.profile.getFavorites({
|
|
276
|
-
* page: 1, //Страница
|
|
277
|
-
* sort: BookmarkSortType.NewToOldAddTime, //Сортировка
|
|
278
|
-
* filter_announce: 0, //Фильтр по анонсам
|
|
279
|
-
* });
|
|
280
|
-
*/
|
|
281
|
-
async getFavorites(data, options) {
|
|
282
|
-
return await this.client.call({
|
|
283
|
-
path: `/favorite/all/${data.page}`,
|
|
284
|
-
queryParams: {
|
|
285
|
-
sort: data.sort,
|
|
286
|
-
filter: data.filter,
|
|
287
|
-
filter_announce: data.filter_announce,
|
|
288
|
-
},
|
|
289
|
-
...options,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Получение подписок в профиле на каналы и блоги
|
|
294
|
-
*
|
|
295
|
-
* Возвращает каналы и блоги {@link IChannel} внутри {@link IPageableResponse}.
|
|
296
|
-
*
|
|
297
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
298
|
-
*
|
|
299
|
-
* @param page - Номер страницы
|
|
300
|
-
* @param options - Дополнительные параметры
|
|
301
|
-
* @returns Каналы и блоги
|
|
302
|
-
*
|
|
303
|
-
* @example
|
|
304
|
-
* const result = await client.endpoints.profile.getSubsciptions(0);
|
|
305
|
-
*/
|
|
306
|
-
async getSubsciptions(page, options) {
|
|
307
|
-
return await this.client.call({
|
|
308
|
-
path: `/channel/subscription/all/${page}`,
|
|
309
|
-
...options,
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Получение количество подписок в профиле на каналы и блоги
|
|
314
|
-
*
|
|
315
|
-
* Возвращает число подписок {@link ISubsciptionCountResponse}.
|
|
316
|
-
*
|
|
317
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
318
|
-
*
|
|
319
|
-
* @param options - Дополнительные параметры
|
|
320
|
-
* @returns Число подписок
|
|
321
|
-
*
|
|
322
|
-
* @example
|
|
323
|
-
* const result = await client.endpoints.profile.getSubsciptionCount(0);
|
|
324
|
-
*/
|
|
325
|
-
async getSubscriptionCount(options) {
|
|
326
|
-
return await this.client.call({
|
|
327
|
-
path: `/channel/subscription/count`,
|
|
328
|
-
...options,
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Получение списка оцененных релизов профиля
|
|
333
|
-
*
|
|
334
|
-
* Возвращает список {@link IVoteRelease} внутри {@link IPageableResponse}.
|
|
335
|
-
*
|
|
336
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
337
|
-
*
|
|
338
|
-
* @param id - ID Профиля
|
|
339
|
-
* @param page - Номер страницы
|
|
340
|
-
* @param sort - Сортировка
|
|
341
|
-
* @param options - Дополнительные параметры
|
|
342
|
-
* @returns Список оцененных релизов
|
|
343
|
-
*
|
|
344
|
-
* @example
|
|
345
|
-
* const result = await client.endpoints.profile.getVotedReleases(1, 0);
|
|
346
|
-
*/
|
|
347
|
-
async getVotedReleases(id, page, sort = 1, options) {
|
|
348
|
-
return await this.client.call({
|
|
349
|
-
path: `/profile/vote/release/voted/${id}/${page}`,
|
|
350
|
-
queryParams: { sort },
|
|
351
|
-
...options,
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Получение списка юзернеймов профиля на другие соц. сети
|
|
356
|
-
*
|
|
357
|
-
* Возвращает ответ {@link ISocialResponse}.
|
|
358
|
-
*
|
|
359
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
360
|
-
*
|
|
361
|
-
* @param id - ID Профиля
|
|
362
|
-
* @param options - Дополнительные параметры
|
|
363
|
-
* @returns Список оцененных релизов
|
|
364
|
-
*
|
|
365
|
-
* @example
|
|
366
|
-
* const result = await client.endpoints.profile.getSocials(1);
|
|
367
|
-
*/
|
|
368
|
-
async getSocials(id, options) {
|
|
369
|
-
return await this.client.call({
|
|
370
|
-
path: `/profile/social/${id}`,
|
|
371
|
-
...options,
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Получение списка неоцененных релизов профиля (Предположительно которые находятся в закладках профиля)
|
|
376
|
-
*
|
|
377
|
-
* Возвращает список {@link IRelease} внутри {@link IPageableResponse}.
|
|
378
|
-
*
|
|
379
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
380
|
-
*
|
|
381
|
-
* @param page - Номер страницы
|
|
382
|
-
* @param options - Дополнительные параметры
|
|
383
|
-
* @returns Список неоцененных релизов
|
|
384
|
-
*
|
|
385
|
-
* @example
|
|
386
|
-
* const result = await client.endpoints.profile.getUnvotedReleases(0);
|
|
387
|
-
*/
|
|
388
|
-
async getUnvotedReleases(page = "last", options) {
|
|
389
|
-
return await this.client.call({
|
|
390
|
-
path: `/profile/vote/release/unvoted/${page}`,
|
|
391
|
-
...options,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Получение списка профилей у которых есть конкретная роль
|
|
396
|
-
*
|
|
397
|
-
* Возвращает список {@link IProfileShort} внутри {@link IPageableResponse}.
|
|
398
|
-
*
|
|
399
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
400
|
-
*
|
|
401
|
-
* @param id - ID Роли
|
|
402
|
-
* @param page - Номер страницы
|
|
403
|
-
* @param options - Дополнительные параметры
|
|
404
|
-
* @returns Список профилей у которых есть конкретная роль
|
|
405
|
-
*
|
|
406
|
-
* @example
|
|
407
|
-
* const result = await client.endpoints.profile.getRoleProfiles(0);
|
|
408
|
-
*/
|
|
409
|
-
async getRoleProfiles(id, page, options) {
|
|
410
|
-
return await this.client.call({ path: `/role/all/${page}/${id}`, ...options });
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Экспорт закладок из профиля
|
|
414
|
-
*
|
|
415
|
-
* Возвращает ответ {@link IExportBookmarksResponse}.
|
|
416
|
-
*
|
|
417
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}, {@link BookmarkExportResult}
|
|
418
|
-
*
|
|
419
|
-
* @param listIds - Типы закладок
|
|
420
|
-
* @param sort - Сортировка
|
|
421
|
-
* @param options - Дополнительные параметры
|
|
422
|
-
* @returns Результат экспорта
|
|
423
|
-
*
|
|
424
|
-
* @example
|
|
425
|
-
* const { BookmarkType } = require("anixartjs");
|
|
426
|
-
*
|
|
427
|
-
* const bookmarks = [BookmarkType.Watching, BookmarkType.Completed];
|
|
428
|
-
* const result = await client.endpoints.profile.exportBookmarks(bookmarks);
|
|
429
|
-
*/
|
|
430
|
-
async exportBookmarks(listIds, sort, options) {
|
|
431
|
-
return await this.client.call({
|
|
432
|
-
path: "/export/bookmarks",
|
|
433
|
-
json: { bookmarksExportProfileLists: listIds },
|
|
434
|
-
queryParams: { sort },
|
|
435
|
-
...options,
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Получение списка профилей которые находятся в блоклисте
|
|
440
|
-
*
|
|
441
|
-
* Возвращает список {@link IProfile} внутри {@link IPageableResponse}.
|
|
442
|
-
*
|
|
443
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
444
|
-
*
|
|
445
|
-
* @param page - Номер страницы
|
|
446
|
-
* @param options - Дополнительные параметры
|
|
447
|
-
* @returns Список профилей
|
|
448
|
-
*
|
|
449
|
-
* @example
|
|
450
|
-
* const result = await client.endpoints.profile.getBlocklist(0);
|
|
451
|
-
*/
|
|
452
|
-
async getBlocklist(page, options) {
|
|
453
|
-
return await this.client.call({
|
|
454
|
-
path: `/profile/blocklist/all/${page}`,
|
|
455
|
-
...options,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Добавление профиля в блоклист
|
|
460
|
-
*
|
|
461
|
-
* Возвращает ответ {@link IResponse}.
|
|
462
|
-
*
|
|
463
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
464
|
-
*
|
|
465
|
-
* @param id - ID Профиля
|
|
466
|
-
* @param options - Дополнительные параметры
|
|
467
|
-
* @returns Код ответа
|
|
468
|
-
*
|
|
469
|
-
* @example
|
|
470
|
-
* const result = await client.endpoints.profile.addToBlocklist(1);
|
|
471
|
-
*/
|
|
472
|
-
async addToBlocklist(id, options) {
|
|
473
|
-
return await this.client.call({
|
|
474
|
-
path: `/profile/blocklist/add/${id}`,
|
|
475
|
-
...options,
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Удаление профиля из блоклиста
|
|
480
|
-
*
|
|
481
|
-
* Возвращает ответ {@link IResponse}.
|
|
482
|
-
*
|
|
483
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
484
|
-
*
|
|
485
|
-
* @param id - ID Профиля
|
|
486
|
-
* @param options - Дополнительные параметры
|
|
487
|
-
* @returns Код ответа
|
|
488
|
-
*
|
|
489
|
-
* @example
|
|
490
|
-
* const result = await client.endpoints.profile.removeToBlocklist(1);
|
|
491
|
-
*/
|
|
492
|
-
async removeFromBlocklist(id, options) {
|
|
493
|
-
return await this.client.call({ path: `/profile/blocklist/remove/${id}`, ...options });
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Получения статуса здоровья профиля
|
|
497
|
-
*
|
|
498
|
-
* Возвращает ответ {@link IHealthStatusResponse}.
|
|
499
|
-
*
|
|
500
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
501
|
-
*
|
|
502
|
-
* @param options - Дополнительные параметры
|
|
503
|
-
* @returns Информацию о статусе
|
|
504
|
-
*
|
|
505
|
-
* @example
|
|
506
|
-
* const result = await client.endpoints.profile.getHealthStatus();
|
|
507
|
-
*/
|
|
508
|
-
async getHealthStatus(options) {
|
|
509
|
-
return await this.client.call({
|
|
510
|
-
path: "/profile/health/status",
|
|
511
|
-
...options,
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Получение действий с контентом
|
|
516
|
-
*
|
|
517
|
-
* Возвращает список {@link IEditEnforcement<any>}, {@link IProfileEnforcement} и {@link IExpiringEnforcement} внутри {@link IPageableResponse}.
|
|
518
|
-
*
|
|
519
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
520
|
-
*
|
|
521
|
-
* @param page - Номер страницы
|
|
522
|
-
* @param options - Дополнительные параметры
|
|
523
|
-
* @returns Список действий
|
|
524
|
-
*
|
|
525
|
-
* @example
|
|
526
|
-
* const result = await client.endpoints.profile.getEnforcementContent(0);
|
|
527
|
-
*/
|
|
528
|
-
async getEnforcementContent(page, options) {
|
|
529
|
-
return await this.client.call({ path: `/profile/health/enforcement/content/all/${page}`, ...options });
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Получение ограничений аккаунта
|
|
533
|
-
*
|
|
534
|
-
* Возвращает список {@link IEditEnforcement<any>}, {@link IProfileEnforcement} и {@link IExpiringEnforcement} внутри {@link IPageableResponse}.
|
|
535
|
-
*
|
|
536
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
537
|
-
*
|
|
538
|
-
* @param page - Номер страницы
|
|
539
|
-
* @param options - Дополнительные параметры
|
|
540
|
-
* @returns Список ограничений
|
|
541
|
-
*
|
|
542
|
-
* @example
|
|
543
|
-
* const result = await client.endpoints.profile.getEnforcementAccount(0);
|
|
544
|
-
*/
|
|
545
|
-
async getEnforcementAccount(page, options) {
|
|
546
|
-
return await this.client.call({ path: `/profile/health/enforcement/account/all/${page}`, ...options });
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Получение конкретного действия
|
|
550
|
-
*
|
|
551
|
-
* Возвращает ответ {@link IProfileEnforcementResponse}.
|
|
552
|
-
*
|
|
553
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
554
|
-
*
|
|
555
|
-
* @param id - ID действия
|
|
556
|
-
* @param options - Дополнительные параметры
|
|
557
|
-
* @returns Действие
|
|
558
|
-
*
|
|
559
|
-
* @example
|
|
560
|
-
* const result = await client.endpoints.profile.getEnforcement(1);
|
|
561
|
-
*/
|
|
562
|
-
async getEnforcement(id, options) {
|
|
563
|
-
return await this.client.call({
|
|
564
|
-
path: `/profile/health/enforcement/${id}`,
|
|
565
|
-
...options,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* Получение комментариев под постами от конкретного профиля
|
|
570
|
-
*
|
|
571
|
-
* Возвращает список {@link IArticleComment} внутри {@link IPageableResponse}.
|
|
572
|
-
*
|
|
573
|
-
* Возможные ответы API в виде enum смотреть здесь {@link DefaultResult}
|
|
574
|
-
*
|
|
575
|
-
* @param id - ID профиля
|
|
576
|
-
* @param page - Номер страницы
|
|
577
|
-
* @param options - Дополнительные параметры
|
|
578
|
-
* @returns Список комментариев
|
|
579
|
-
*
|
|
580
|
-
* @example
|
|
581
|
-
* const result = await client.endpoints.profile.getArticleComments(1, 0);
|
|
582
|
-
*/
|
|
583
|
-
async getArticleComments(id, page, options) {
|
|
584
|
-
return await this.client.call({
|
|
585
|
-
path: `/article/comment/all/profile/${id}/${page}`,
|
|
586
|
-
...options,
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
exports.Profile = Profile;
|
package/dist/api/release.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Anixart } from "../client";
|
|
2
|
-
import { ICommentRelease, ICommentReleaseRequest, ICommentReleaseResponse, ICommentRepliesRequest, IDubbersResponse, IRelease, IReleaseResponse, ISourcesResponse, IVideo, IVideoReleaseInCategoryRequest, IVideoResponse, IEpisodesResponse, VoteType, IEpisodeResponse, IBaseApiParams, IBaseCommentAddRequest, IPageableResponse, IResponse, IReleaseFilterRequest, IProfileShort, IVideoStreamingPlatform, CommentDeleteResult, CommentEditResult, ILastEpisodeUpdate } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Класс релиза
|
|
5
|
-
*
|
|
6
|
-
* TODO: notification
|
|
7
|
-
*/
|
|
8
|
-
export declare class Release {
|
|
9
|
-
private readonly client;
|
|
10
|
-
constructor(client: Anixart);
|
|
11
|
-
info(id: number, extended?: boolean, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
12
|
-
addVote(id: number, vote: 1 | 2 | 3 | 4 | 5, options?: IBaseApiParams): Promise<IResponse>;
|
|
13
|
-
removeVote(id: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
14
|
-
getComments(data: ICommentReleaseRequest, options?: IBaseApiParams): Promise<IPageableResponse<ICommentRelease>>;
|
|
15
|
-
addComment(id: number, data: IBaseCommentAddRequest, options?: IBaseApiParams): Promise<ICommentReleaseResponse>;
|
|
16
|
-
voteComment(id: number, vote: VoteType, options?: IBaseApiParams): Promise<IResponse>;
|
|
17
|
-
removeComment(id: number, options?: IBaseApiParams): Promise<IResponse<CommentDeleteResult>>;
|
|
18
|
-
editComment(id: number, message: string, spoiler: boolean, options?: IBaseApiParams): Promise<IResponse<CommentEditResult>>;
|
|
19
|
-
getCommentReplies(data: ICommentRepliesRequest, options?: IBaseApiParams): Promise<IPageableResponse<ICommentRelease>>;
|
|
20
|
-
getRelatedReleases(id: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
21
|
-
getVideos(id: number, options?: IBaseApiParams): Promise<IVideoResponse>;
|
|
22
|
-
getVideoInCategory(data: IVideoReleaseInCategoryRequest, options?: IBaseApiParams): Promise<IPageableResponse<IVideo>>;
|
|
23
|
-
getDubbers(id: number, options?: IBaseApiParams): Promise<IDubbersResponse>;
|
|
24
|
-
getDubberSources(id: number, dubberId: number, options?: IBaseApiParams): Promise<ISourcesResponse>;
|
|
25
|
-
getEpisodes(id: number, dubberId: number, sourceId: number, sort?: number, options?: IBaseApiParams): Promise<IEpisodesResponse>;
|
|
26
|
-
getEpisode(id: number, sourceId: number, episodePosition: number, options?: IBaseApiParams): Promise<IEpisodeResponse>;
|
|
27
|
-
getRandomRelease(extended?: boolean, options?: IBaseApiParams): Promise<IReleaseResponse>;
|
|
28
|
-
markEpisodeAsWatched(id: number, sourceId: number, episodePosition: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
29
|
-
unmarkEpisodeAsWatched(id: number, sourceId: number, episodePosition: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
30
|
-
addToHistory(id: number, sourceId: number, episodePosition: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
31
|
-
removeFromHistory(id: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
32
|
-
getHistory(page: number, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
33
|
-
filter(page: number, data: IReleaseFilterRequest, extended?: boolean, options?: IBaseApiParams): Promise<IPageableResponse<IRelease>>;
|
|
34
|
-
addFavorite(id: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
35
|
-
removeFavorite(id: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
36
|
-
addToProfileList(id: number, type: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
37
|
-
removeFromProfileList(id: number, type: number, options?: IBaseApiParams): Promise<IResponse>;
|
|
38
|
-
getStreaming(id: number, options?: IBaseApiParams): Promise<IPageableResponse<IVideoStreamingPlatform>>;
|
|
39
|
-
getCommentVotes(id: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<IProfileShort>>;
|
|
40
|
-
getEpisodeUpdates(id: number, page: number, options?: IBaseApiParams): Promise<IPageableResponse<ILastEpisodeUpdate>>;
|
|
41
|
-
}
|