@book000/pixivts 0.55.1 → 0.56.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/README.md +115 -19
- package/dist/index.cjs +1321 -0
- package/dist/index.d.cts +1662 -0
- package/dist/index.d.ts +1662 -45
- package/dist/index.js +1308 -65
- package/package.json +35 -72
- package/dist/checks.d.ts +0 -19
- package/dist/checks.d.ts.map +0 -1
- package/dist/checks.js +0 -85
- package/dist/checks.js.map +0 -1
- package/dist/checks.test.d.ts +0 -2
- package/dist/checks.test.d.ts.map +0 -1
- package/dist/checks.test.js +0 -306
- package/dist/checks.test.js.map +0 -1
- package/dist/http-client.d.ts +0 -66
- package/dist/http-client.d.ts.map +0 -1
- package/dist/http-client.js +0 -138
- package/dist/http-client.js.map +0 -1
- package/dist/http-client.test.d.ts +0 -2
- package/dist/http-client.test.d.ts.map +0 -1
- package/dist/http-client.test.js +0 -149
- package/dist/http-client.test.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/options.d.ts +0 -317
- package/dist/options.d.ts.map +0 -1
- package/dist/options.js +0 -222
- package/dist/options.js.map +0 -1
- package/dist/options.test.d.ts +0 -2
- package/dist/options.test.d.ts.map +0 -1
- package/dist/options.test.js +0 -117
- package/dist/options.test.js.map +0 -1
- package/dist/pixiv.d.ts +0 -317
- package/dist/pixiv.d.ts.map +0 -1
- package/dist/pixiv.js +0 -810
- package/dist/pixiv.js.map +0 -1
- package/dist/pixiv.test.d.ts +0 -2
- package/dist/pixiv.test.d.ts.map +0 -1
- package/dist/pixiv.test.js +0 -883
- package/dist/pixiv.test.js.map +0 -1
- package/dist/saving-responses/index.d.ts +0 -130
- package/dist/saving-responses/index.d.ts.map +0 -1
- package/dist/saving-responses/index.js +0 -263
- package/dist/saving-responses/index.js.map +0 -1
- package/dist/saving-responses/index.test.d.ts +0 -2
- package/dist/saving-responses/index.test.d.ts.map +0 -1
- package/dist/saving-responses/index.test.js +0 -468
- package/dist/saving-responses/index.test.js.map +0 -1
- package/dist/saving-responses/response-entity.d.ts +0 -16
- package/dist/saving-responses/response-entity.d.ts.map +0 -1
- package/dist/saving-responses/response-entity.js +0 -101
- package/dist/saving-responses/response-entity.js.map +0 -1
- package/dist/types/endpoints/v1/illust/bookmark/delete.d.ts +0 -14
- package/dist/types/endpoints/v1/illust/bookmark/delete.d.ts.map +0 -1
- package/dist/types/endpoints/v1/illust/bookmark/delete.js +0 -3
- package/dist/types/endpoints/v1/illust/bookmark/delete.js.map +0 -1
- package/dist/types/endpoints/v1/illust/detail.d.ts +0 -25
- package/dist/types/endpoints/v1/illust/detail.d.ts.map +0 -1
- package/dist/types/endpoints/v1/illust/detail.js +0 -20
- package/dist/types/endpoints/v1/illust/detail.js.map +0 -1
- package/dist/types/endpoints/v1/illust/ranking.d.ts +0 -51
- package/dist/types/endpoints/v1/illust/ranking.d.ts.map +0 -1
- package/dist/types/endpoints/v1/illust/ranking.js +0 -40
- package/dist/types/endpoints/v1/illust/ranking.js.map +0 -1
- package/dist/types/endpoints/v1/illust/recommended.d.ts +0 -104
- package/dist/types/endpoints/v1/illust/recommended.d.ts.map +0 -1
- package/dist/types/endpoints/v1/illust/recommended.js +0 -44
- package/dist/types/endpoints/v1/illust/recommended.js.map +0 -1
- package/dist/types/endpoints/v1/illust/series.d.ts +0 -45
- package/dist/types/endpoints/v1/illust/series.d.ts.map +0 -1
- package/dist/types/endpoints/v1/illust/series.js +0 -31
- package/dist/types/endpoints/v1/illust/series.js.map +0 -1
- package/dist/types/endpoints/v1/illust/ugoira/metadata.d.ts +0 -25
- package/dist/types/endpoints/v1/illust/ugoira/metadata.d.ts.map +0 -1
- package/dist/types/endpoints/v1/illust/ugoira/metadata.js +0 -20
- package/dist/types/endpoints/v1/illust/ugoira/metadata.js.map +0 -1
- package/dist/types/endpoints/v1/manga/recommended.d.ts +0 -72
- package/dist/types/endpoints/v1/manga/recommended.d.ts.map +0 -1
- package/dist/types/endpoints/v1/manga/recommended.js +0 -33
- package/dist/types/endpoints/v1/manga/recommended.js.map +0 -1
- package/dist/types/endpoints/v1/novel/bookmark/delete.d.ts +0 -14
- package/dist/types/endpoints/v1/novel/bookmark/delete.d.ts.map +0 -1
- package/dist/types/endpoints/v1/novel/bookmark/delete.js +0 -3
- package/dist/types/endpoints/v1/novel/bookmark/delete.js.map +0 -1
- package/dist/types/endpoints/v1/novel/ranking.d.ts +0 -47
- package/dist/types/endpoints/v1/novel/ranking.d.ts.map +0 -1
- package/dist/types/endpoints/v1/novel/ranking.js +0 -39
- package/dist/types/endpoints/v1/novel/ranking.js.map +0 -1
- package/dist/types/endpoints/v1/novel/recommended.d.ts +0 -72
- package/dist/types/endpoints/v1/novel/recommended.d.ts.map +0 -1
- package/dist/types/endpoints/v1/novel/recommended.js +0 -32
- package/dist/types/endpoints/v1/novel/recommended.js.map +0 -1
- package/dist/types/endpoints/v1/novel/related.d.ts +0 -37
- package/dist/types/endpoints/v1/novel/related.d.ts.map +0 -1
- package/dist/types/endpoints/v1/novel/related.js +0 -24
- package/dist/types/endpoints/v1/novel/related.js.map +0 -1
- package/dist/types/endpoints/v1/search/illust.d.ts +0 -109
- package/dist/types/endpoints/v1/search/illust.d.ts.map +0 -1
- package/dist/types/endpoints/v1/search/illust.js +0 -40
- package/dist/types/endpoints/v1/search/illust.js.map +0 -1
- package/dist/types/endpoints/v1/search/novel.d.ts +0 -103
- package/dist/types/endpoints/v1/search/novel.d.ts.map +0 -1
- package/dist/types/endpoints/v1/search/novel.js +0 -38
- package/dist/types/endpoints/v1/search/novel.js.map +0 -1
- package/dist/types/endpoints/v1/user/bookmarks/illust.d.ts +0 -48
- package/dist/types/endpoints/v1/user/bookmarks/illust.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/bookmarks/illust.js +0 -31
- package/dist/types/endpoints/v1/user/bookmarks/illust.js.map +0 -1
- package/dist/types/endpoints/v1/user/bookmarks/novel.d.ts +0 -44
- package/dist/types/endpoints/v1/user/bookmarks/novel.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/bookmarks/novel.js +0 -28
- package/dist/types/endpoints/v1/user/bookmarks/novel.js.map +0 -1
- package/dist/types/endpoints/v1/user/detail.d.ts +0 -44
- package/dist/types/endpoints/v1/user/detail.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/detail.js +0 -26
- package/dist/types/endpoints/v1/user/detail.js.map +0 -1
- package/dist/types/endpoints/v1/user/follow/add.d.ts +0 -24
- package/dist/types/endpoints/v1/user/follow/add.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/follow/add.js +0 -3
- package/dist/types/endpoints/v1/user/follow/add.js.map +0 -1
- package/dist/types/endpoints/v1/user/follow/delete.d.ts +0 -14
- package/dist/types/endpoints/v1/user/follow/delete.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/follow/delete.js +0 -3
- package/dist/types/endpoints/v1/user/follow/delete.js.map +0 -1
- package/dist/types/endpoints/v1/user/following.d.ts +0 -38
- package/dist/types/endpoints/v1/user/following.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/following.js +0 -26
- package/dist/types/endpoints/v1/user/following.js.map +0 -1
- package/dist/types/endpoints/v1/user/illusts.d.ts +0 -51
- package/dist/types/endpoints/v1/user/illusts.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/illusts.js +0 -31
- package/dist/types/endpoints/v1/user/illusts.js.map +0 -1
- package/dist/types/endpoints/v1/user/novels.d.ts +0 -43
- package/dist/types/endpoints/v1/user/novels.d.ts.map +0 -1
- package/dist/types/endpoints/v1/user/novels.js +0 -29
- package/dist/types/endpoints/v1/user/novels.js.map +0 -1
- package/dist/types/endpoints/v2/illust/bookmark/add.d.ts +0 -28
- package/dist/types/endpoints/v2/illust/bookmark/add.d.ts.map +0 -1
- package/dist/types/endpoints/v2/illust/bookmark/add.js +0 -3
- package/dist/types/endpoints/v2/illust/bookmark/add.js.map +0 -1
- package/dist/types/endpoints/v2/illust/related.d.ts +0 -48
- package/dist/types/endpoints/v2/illust/related.d.ts.map +0 -1
- package/dist/types/endpoints/v2/illust/related.js +0 -32
- package/dist/types/endpoints/v2/illust/related.js.map +0 -1
- package/dist/types/endpoints/v2/novel/bookmark/add.d.ts +0 -27
- package/dist/types/endpoints/v2/novel/bookmark/add.d.ts.map +0 -1
- package/dist/types/endpoints/v2/novel/bookmark/add.js +0 -3
- package/dist/types/endpoints/v2/novel/bookmark/add.js.map +0 -1
- package/dist/types/endpoints/v2/novel/detail.d.ts +0 -25
- package/dist/types/endpoints/v2/novel/detail.d.ts.map +0 -1
- package/dist/types/endpoints/v2/novel/detail.js +0 -20
- package/dist/types/endpoints/v2/novel/detail.js.map +0 -1
- package/dist/types/endpoints/v2/novel/series.d.ts +0 -49
- package/dist/types/endpoints/v2/novel/series.d.ts.map +0 -1
- package/dist/types/endpoints/v2/novel/series.js +0 -31
- package/dist/types/endpoints/v2/novel/series.js.map +0 -1
- package/dist/types/endpoints/webview/v2/novel.d.ts +0 -21
- package/dist/types/endpoints/webview/v2/novel.d.ts.map +0 -1
- package/dist/types/endpoints/webview/v2/novel.js +0 -18
- package/dist/types/endpoints/webview/v2/novel.js.map +0 -1
- package/dist/types/error-response.d.ts +0 -31
- package/dist/types/error-response.d.ts.map +0 -1
- package/dist/types/error-response.js +0 -3
- package/dist/types/error-response.js.map +0 -1
- package/dist/types/errors.d.ts +0 -7
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js +0 -14
- package/dist/types/errors.js.map +0 -1
- package/dist/types/pixiv-common.d.ts +0 -103
- package/dist/types/pixiv-common.d.ts.map +0 -1
- package/dist/types/pixiv-common.js +0 -68
- package/dist/types/pixiv-common.js.map +0 -1
- package/dist/types/pixiv-illust-series.d.ts +0 -56
- package/dist/types/pixiv-illust-series.d.ts.map +0 -1
- package/dist/types/pixiv-illust-series.js +0 -26
- package/dist/types/pixiv-illust-series.js.map +0 -1
- package/dist/types/pixiv-illust.d.ts +0 -180
- package/dist/types/pixiv-illust.d.ts.map +0 -1
- package/dist/types/pixiv-illust.js +0 -56
- package/dist/types/pixiv-illust.js.map +0 -1
- package/dist/types/pixiv-novel-series.d.ts +0 -84
- package/dist/types/pixiv-novel-series.d.ts.map +0 -1
- package/dist/types/pixiv-novel-series.js +0 -43
- package/dist/types/pixiv-novel-series.js.map +0 -1
- package/dist/types/pixiv-novel.d.ts +0 -131
- package/dist/types/pixiv-novel.d.ts.map +0 -1
- package/dist/types/pixiv-novel.js +0 -44
- package/dist/types/pixiv-novel.js.map +0 -1
- package/dist/types/pixiv-ugoira.d.ts +0 -50
- package/dist/types/pixiv-ugoira.d.ts.map +0 -1
- package/dist/types/pixiv-ugoira.js +0 -34
- package/dist/types/pixiv-ugoira.js.map +0 -1
- package/dist/types/pixiv-user.d.ts +0 -212
- package/dist/types/pixiv-user.d.ts.map +0 -1
- package/dist/types/pixiv-user.js +0 -118
- package/dist/types/pixiv-user.js.map +0 -1
- package/dist/utils.d.ts +0 -3
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -15
- package/dist/utils.js.map +0 -1
- package/dist/utils.test.d.ts +0 -2
- package/dist/utils.test.d.ts.map +0 -1
- package/dist/utils.test.js +0 -15
- package/dist/utils.test.js.map +0 -1
package/dist/pixiv.d.ts
DELETED
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
import qs from 'qs';
|
|
2
|
-
import { IllustDetailOptions, SearchIllustOptions, RecommendedIllustOptions, IllustBookmarkAddOptions, NovelDetailOptions, SearchNovelOptions, RecommendedNovelOptions, NovelSeriesOptions, UserDetailOptions, IllustSeriesOptions, NovelTextOptions, MangaRecommendedOptions, IllustBookmarkDeleteOptions, NovelBookmarkAddOptions, NovelBookmarkDeleteOptions, UserBookmarksIllustOptions, UserBookmarksNovelOptions, UgoiraDetailOptions, IllustRelatedOptions, NovelRelatedOptions, IllustRankingOptions, NovelRankingOptions, UserFollowingOptions, UserFollowAddOptions, UserFollowDeleteOptions, UserIllustsOptions, UserNovelsOptions } from './options';
|
|
3
|
-
import { PixivApiResponse, PixivHttpClient, PixivRateLimitRetryOptions } from './http-client';
|
|
4
|
-
import { PixivApiError } from './types/error-response';
|
|
5
|
-
import { GetV1IllustDetailResponse } from './types/endpoints/v1/illust/detail';
|
|
6
|
-
import { GetV1SearchIllustResponse } from './types/endpoints/v1/search/illust';
|
|
7
|
-
import { GetV1IllustRecommendedResponse } from './types/endpoints/v1/illust/recommended';
|
|
8
|
-
import { PostV2IllustBookmarkAddResponse } from './types/endpoints/v2/illust/bookmark/add';
|
|
9
|
-
import { GetV1IllustSeriesResponse } from './types/endpoints/v1/illust/series';
|
|
10
|
-
import { GetV2NovelDetailResponse } from './types/endpoints/v2/novel/detail';
|
|
11
|
-
import { GetV1SearchNovelResponse } from './types/endpoints/v1/search/novel';
|
|
12
|
-
import { GetV1NovelRecommendedResponse } from './types/endpoints/v1/novel/recommended';
|
|
13
|
-
import { GetV2NovelSeriesResponse } from './types/endpoints/v2/novel/series';
|
|
14
|
-
import { GetV1UserDetailResponse } from './types/endpoints/v1/user/detail';
|
|
15
|
-
import { GetV1MangaRecommendedResponse } from './types/endpoints/v1/manga/recommended';
|
|
16
|
-
import { PostV1IllustBookmarkDeleteResponse } from './types/endpoints/v1/illust/bookmark/delete';
|
|
17
|
-
import { PostV2NovelBookmarkAddResponse } from './types/endpoints/v2/novel/bookmark/add';
|
|
18
|
-
import { PostV1NovelBookmarkDeleteResponse } from './types/endpoints/v1/novel/bookmark/delete';
|
|
19
|
-
import { GetV1UserBookmarksNovelResponse } from './types/endpoints/v1/user/bookmarks/novel';
|
|
20
|
-
import { GetV1UserBookmarksIllustResponse } from './types/endpoints/v1/user/bookmarks/illust';
|
|
21
|
-
import { GetV1IllustUgoiraMetadataResponse } from './types/endpoints/v1/illust/ugoira/metadata';
|
|
22
|
-
import { ResponseDatabase, ResponseDatabaseOptions } from './saving-responses';
|
|
23
|
-
import { GetV2IllustRelatedResponse } from './types/endpoints/v2/illust/related';
|
|
24
|
-
import { GetV1NovelRelatedResponse } from './types/endpoints/v1/novel/related';
|
|
25
|
-
import { GetV1IllustRankingResponse } from './types/endpoints/v1/illust/ranking';
|
|
26
|
-
import { GetV1NovelRankingResponse } from './types/endpoints/v1/novel/ranking';
|
|
27
|
-
import { GetV1UserFollowingResponse } from './types/endpoints/v1/user/following';
|
|
28
|
-
import { PostV1UserFollowAddResponse } from './types/endpoints/v1/user/follow/add';
|
|
29
|
-
import { PostV1UserFollowDeleteResponse } from './types/endpoints/v1/user/follow/delete';
|
|
30
|
-
import { GetV1UserIllustsResponse } from './types/endpoints/v1/user/illusts';
|
|
31
|
-
import { GetV1UserNovelsResponse } from './types/endpoints/v1/user/novels';
|
|
32
|
-
export interface PixivDebugOutputResponseOptions {
|
|
33
|
-
enable: boolean;
|
|
34
|
-
db?: ResponseDatabaseOptions;
|
|
35
|
-
}
|
|
36
|
-
export interface PixivDebugOptions {
|
|
37
|
-
outputResponse?: PixivDebugOutputResponseOptions;
|
|
38
|
-
}
|
|
39
|
-
export interface PixivTsOptions {
|
|
40
|
-
debugOptions?: PixivDebugOptions;
|
|
41
|
-
rateLimitRetryOptions?: PixivRateLimitRetryOptions;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* pixiv API
|
|
45
|
-
*/
|
|
46
|
-
export default class Pixiv {
|
|
47
|
-
private static clientId;
|
|
48
|
-
private static clientSecret;
|
|
49
|
-
private static hashSecret;
|
|
50
|
-
private hosts;
|
|
51
|
-
readonly userId: string;
|
|
52
|
-
readonly accessToken: string;
|
|
53
|
-
readonly refreshToken: string;
|
|
54
|
-
readonly responseDatabase: ResponseDatabase | null;
|
|
55
|
-
readonly rateLimitRetryOptions: PixivRateLimitRetryOptions | null;
|
|
56
|
-
readonly http: PixivHttpClient;
|
|
57
|
-
/**
|
|
58
|
-
* Constructor. Cannot be instantiated externally; use the `of` method instead.
|
|
59
|
-
*
|
|
60
|
-
* @param userId User ID
|
|
61
|
-
* @param accessToken Access token
|
|
62
|
-
* @param refreshToken Refresh token
|
|
63
|
-
* @param responseDatabase Database for saving responses (null if not used)
|
|
64
|
-
* @param rateLimitRetryOptions Retry settings for 429 errors
|
|
65
|
-
*/
|
|
66
|
-
private constructor();
|
|
67
|
-
/**
|
|
68
|
-
* Creates an instance from a refresh token.
|
|
69
|
-
*
|
|
70
|
-
* @param refreshToken Refresh token
|
|
71
|
-
* @returns Pixiv instance
|
|
72
|
-
*/
|
|
73
|
-
static of(refreshToken: string, pixivTsOptions?: PixivTsOptions): Promise<Pixiv>;
|
|
74
|
-
/**
|
|
75
|
-
* Returns a `Response` for fetching an image.
|
|
76
|
-
*
|
|
77
|
-
* The return value is a `Response` object, not the stream itself;
|
|
78
|
-
* to read it as a stream, refer to `response.body`.
|
|
79
|
-
* Other `Response` APIs such as `arrayBuffer()` can also be used as needed.
|
|
80
|
-
*
|
|
81
|
-
* @param url Image URL
|
|
82
|
-
* @returns The `Response` from fetching the image
|
|
83
|
-
*/
|
|
84
|
-
static getImageStream(url: string): Promise<Response>;
|
|
85
|
-
/**
|
|
86
|
-
* Gets the details of an illust.
|
|
87
|
-
*
|
|
88
|
-
* @param options Options
|
|
89
|
-
* @returns Response
|
|
90
|
-
*/
|
|
91
|
-
illustDetail(options: IllustDetailOptions): Promise<PixivApiResponse<GetV1IllustDetailResponse>>;
|
|
92
|
-
/**
|
|
93
|
-
* Gets illusts related to an illust.
|
|
94
|
-
*
|
|
95
|
-
* @param options Options
|
|
96
|
-
* @returns Response
|
|
97
|
-
*/
|
|
98
|
-
illustRelated(options: IllustRelatedOptions): Promise<PixivApiResponse<GetV2IllustRelatedResponse>>;
|
|
99
|
-
/**
|
|
100
|
-
* Searches for illusts.
|
|
101
|
-
*
|
|
102
|
-
* @param options Options
|
|
103
|
-
* @returns Response
|
|
104
|
-
*/
|
|
105
|
-
searchIllust(options: SearchIllustOptions): Promise<PixivApiResponse<GetV1SearchIllustResponse>>;
|
|
106
|
-
/**
|
|
107
|
-
* Gets the illust ranking.
|
|
108
|
-
*
|
|
109
|
-
* @param options Options
|
|
110
|
-
* @returns Response
|
|
111
|
-
*/
|
|
112
|
-
illustRanking(options?: IllustRankingOptions): Promise<PixivApiResponse<GetV1IllustRankingResponse>>;
|
|
113
|
-
/**
|
|
114
|
-
* Gets recommended illusts.
|
|
115
|
-
*
|
|
116
|
-
* @param options Options
|
|
117
|
-
* @returns Response
|
|
118
|
-
*/
|
|
119
|
-
illustRecommended(options?: RecommendedIllustOptions): Promise<PixivApiResponse<GetV1IllustRecommendedResponse>>;
|
|
120
|
-
/**
|
|
121
|
-
* Gets the details of an illust series.
|
|
122
|
-
*
|
|
123
|
-
* @param options Options
|
|
124
|
-
* @returns Response
|
|
125
|
-
*/
|
|
126
|
-
illustSeries(options: IllustSeriesOptions): Promise<PixivApiResponse<GetV1IllustSeriesResponse>>;
|
|
127
|
-
/**
|
|
128
|
-
* Bookmarks an illust.
|
|
129
|
-
*
|
|
130
|
-
* @param options Options
|
|
131
|
-
* @returns Response
|
|
132
|
-
*/
|
|
133
|
-
illustBookmarkAdd(options: IllustBookmarkAddOptions): Promise<PixivApiResponse<PostV2IllustBookmarkAddResponse>>;
|
|
134
|
-
/**
|
|
135
|
-
* Removes an illust bookmark.
|
|
136
|
-
*
|
|
137
|
-
* @param options Options
|
|
138
|
-
* @returns Response
|
|
139
|
-
*/
|
|
140
|
-
illustBookmarkDelete(options: IllustBookmarkDeleteOptions): Promise<PixivApiResponse<PostV1IllustBookmarkDeleteResponse>>;
|
|
141
|
-
mangaRecommended(options?: MangaRecommendedOptions): Promise<PixivApiResponse<GetV1MangaRecommendedResponse>>;
|
|
142
|
-
/**
|
|
143
|
-
* Gets the details of an ugoira.
|
|
144
|
-
*
|
|
145
|
-
* @param options Options
|
|
146
|
-
* @returns Response
|
|
147
|
-
*/
|
|
148
|
-
ugoiraMetadata(options: UgoiraDetailOptions): Promise<PixivApiResponse<GetV1IllustUgoiraMetadataResponse>>;
|
|
149
|
-
/**
|
|
150
|
-
* Gets the details of a novel.
|
|
151
|
-
*
|
|
152
|
-
* @param options Options
|
|
153
|
-
* @returns Response
|
|
154
|
-
*/
|
|
155
|
-
novelDetail(options: NovelDetailOptions): Promise<PixivApiResponse<GetV2NovelDetailResponse>>;
|
|
156
|
-
/**
|
|
157
|
-
* Gets the text of a novel.
|
|
158
|
-
*
|
|
159
|
-
* @param options Options
|
|
160
|
-
* @returns Response
|
|
161
|
-
*/
|
|
162
|
-
novelText(options: NovelTextOptions): Promise<PixivApiResponse<string>>;
|
|
163
|
-
/**
|
|
164
|
-
* Gets novels related to a novel.
|
|
165
|
-
*
|
|
166
|
-
* @param options Options
|
|
167
|
-
* @returns Response
|
|
168
|
-
*/
|
|
169
|
-
novelRelated(options: NovelRelatedOptions): Promise<PixivApiResponse<GetV1NovelRelatedResponse>>;
|
|
170
|
-
/**
|
|
171
|
-
* Searches for novels.
|
|
172
|
-
*
|
|
173
|
-
* @param options Options
|
|
174
|
-
* @returns Response
|
|
175
|
-
*/
|
|
176
|
-
searchNovel(options: SearchNovelOptions): Promise<PixivApiResponse<GetV1SearchNovelResponse>>;
|
|
177
|
-
/**
|
|
178
|
-
* Gets the novel ranking.
|
|
179
|
-
*/
|
|
180
|
-
novelRanking(options?: NovelRankingOptions): Promise<PixivApiResponse<GetV1NovelRankingResponse>>;
|
|
181
|
-
/**
|
|
182
|
-
* Gets recommended novels.
|
|
183
|
-
*
|
|
184
|
-
* @param options Options
|
|
185
|
-
* @returns Response
|
|
186
|
-
*/
|
|
187
|
-
novelRecommended(options?: RecommendedNovelOptions): Promise<PixivApiResponse<GetV1NovelRecommendedResponse>>;
|
|
188
|
-
/**
|
|
189
|
-
* Gets the details of a novel series.
|
|
190
|
-
*
|
|
191
|
-
* @param options Options
|
|
192
|
-
* @returns Response
|
|
193
|
-
*/
|
|
194
|
-
novelSeries(options: NovelSeriesOptions): Promise<PixivApiResponse<GetV2NovelSeriesResponse>>;
|
|
195
|
-
/**
|
|
196
|
-
* Bookmarks a novel.
|
|
197
|
-
*
|
|
198
|
-
* @param options Options
|
|
199
|
-
* @returns Response
|
|
200
|
-
*/
|
|
201
|
-
novelBookmarkAdd(options: NovelBookmarkAddOptions): Promise<PixivApiResponse<PostV2NovelBookmarkAddResponse>>;
|
|
202
|
-
/**
|
|
203
|
-
* Removes a novel bookmark.
|
|
204
|
-
*
|
|
205
|
-
* @param options Options
|
|
206
|
-
* @returns Response
|
|
207
|
-
*/
|
|
208
|
-
novelBookmarkDelete(options: NovelBookmarkDeleteOptions): Promise<PixivApiResponse<PostV1NovelBookmarkDeleteResponse>>;
|
|
209
|
-
/**
|
|
210
|
-
* Gets the details of a user.
|
|
211
|
-
*
|
|
212
|
-
* @param options Options
|
|
213
|
-
* @returns Response
|
|
214
|
-
*/
|
|
215
|
-
userDetail(options: UserDetailOptions): Promise<PixivApiResponse<GetV1UserDetailResponse>>;
|
|
216
|
-
/**
|
|
217
|
-
* Gets a user's illusts or manga.
|
|
218
|
-
*
|
|
219
|
-
* @param options Options
|
|
220
|
-
* @returns Response
|
|
221
|
-
*/
|
|
222
|
-
userIllusts(options: UserIllustsOptions): Promise<PixivApiResponse<GetV1UserIllustsResponse>>;
|
|
223
|
-
/**
|
|
224
|
-
* Gets a user's novels.
|
|
225
|
-
*
|
|
226
|
-
* @param options Options
|
|
227
|
-
* @returns Response
|
|
228
|
-
*/
|
|
229
|
-
userNovels(options: UserNovelsOptions): Promise<PixivApiResponse<GetV1UserNovelsResponse>>;
|
|
230
|
-
/**
|
|
231
|
-
* Gets a user's illust bookmarks.
|
|
232
|
-
*
|
|
233
|
-
* @param options Options
|
|
234
|
-
* @returns Response
|
|
235
|
-
*/
|
|
236
|
-
userBookmarksIllust(options: UserBookmarksIllustOptions): Promise<PixivApiResponse<GetV1UserBookmarksIllustResponse>>;
|
|
237
|
-
/**
|
|
238
|
-
* Gets a user's novel bookmarks.
|
|
239
|
-
*
|
|
240
|
-
* @param options Options
|
|
241
|
-
* @returns Response
|
|
242
|
-
*/
|
|
243
|
-
userBookmarksNovel(options: UserBookmarksNovelOptions): Promise<PixivApiResponse<GetV1UserBookmarksNovelResponse>>;
|
|
244
|
-
/**
|
|
245
|
-
* Gets the list of users a user is following.
|
|
246
|
-
*
|
|
247
|
-
* @param options Options
|
|
248
|
-
* @returns Response
|
|
249
|
-
*/
|
|
250
|
-
userFollowing(options: UserFollowingOptions): Promise<PixivApiResponse<GetV1UserFollowingResponse>>;
|
|
251
|
-
/**
|
|
252
|
-
* Follows a user.
|
|
253
|
-
*
|
|
254
|
-
* @param options Options
|
|
255
|
-
* @returns Response
|
|
256
|
-
*/
|
|
257
|
-
userFollowAdd(options: UserFollowAddOptions): Promise<PixivApiResponse<PostV1UserFollowAddResponse>>;
|
|
258
|
-
/**
|
|
259
|
-
* Unfollows a user.
|
|
260
|
-
*
|
|
261
|
-
* @param options Options
|
|
262
|
-
* @returns Response
|
|
263
|
-
*/
|
|
264
|
-
userFollowDelete(options: UserFollowDeleteOptions): Promise<PixivApiResponse<PostV1UserFollowDeleteResponse>>;
|
|
265
|
-
/**
|
|
266
|
-
* Closes the connection.
|
|
267
|
-
*/
|
|
268
|
-
close(): Promise<void>;
|
|
269
|
-
/**
|
|
270
|
-
* Parses a query string.
|
|
271
|
-
*
|
|
272
|
-
* @param url URL
|
|
273
|
-
* @returns The parsed query string object
|
|
274
|
-
*/
|
|
275
|
-
static parseQueryString(url: string): qs.ParsedQs;
|
|
276
|
-
/**
|
|
277
|
-
* Determines whether the response is an error.
|
|
278
|
-
*
|
|
279
|
-
* @param response Axios response
|
|
280
|
-
* @returns Whether it is an error
|
|
281
|
-
*/
|
|
282
|
-
static isError(response: any): response is PixivApiError;
|
|
283
|
-
/**
|
|
284
|
-
* Generates an MD5 hash.
|
|
285
|
-
*
|
|
286
|
-
* @param str String
|
|
287
|
-
* @returns Hash
|
|
288
|
-
*/
|
|
289
|
-
private static hash;
|
|
290
|
-
/**
|
|
291
|
-
* Sends a request.
|
|
292
|
-
*
|
|
293
|
-
* The order of generics is T: request, U: response.
|
|
294
|
-
*
|
|
295
|
-
* @param options Options
|
|
296
|
-
* @returns Response
|
|
297
|
-
*/
|
|
298
|
-
private request;
|
|
299
|
-
private saveResponse;
|
|
300
|
-
private isJSON;
|
|
301
|
-
/**
|
|
302
|
-
* Checks whether the required options are included.
|
|
303
|
-
*
|
|
304
|
-
* @param options Options
|
|
305
|
-
* @param required Required option keys
|
|
306
|
-
* @throws If a required option is missing
|
|
307
|
-
*/
|
|
308
|
-
private checkRequiredOptions;
|
|
309
|
-
/**
|
|
310
|
-
* Converts camelCase object keys to snake_case object keys.
|
|
311
|
-
*
|
|
312
|
-
* @param object Object
|
|
313
|
-
* @returns The converted object
|
|
314
|
-
*/
|
|
315
|
-
private convertCamelToSnake;
|
|
316
|
-
}
|
|
317
|
-
//# sourceMappingURL=pixiv.d.ts.map
|
package/dist/pixiv.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pixiv.d.ts","sourceRoot":"","sources":["../src/pixiv.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAKhB,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EAEpB,mBAAmB,EAEnB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EA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