@book000/pixivts 0.56.0 → 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/dist/index.cjs +6 -2
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +6 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -883,15 +883,19 @@ var NovelResource = class {
|
|
|
883
883
|
);
|
|
884
884
|
}
|
|
885
885
|
/**
|
|
886
|
-
* Fetches the
|
|
886
|
+
* Fetches the WebView HTML for a novel.
|
|
887
887
|
* GET /webview/v2/novel
|
|
888
888
|
*
|
|
889
|
+
* Returns the raw HTML page that the pixiv app renders in a WebView.
|
|
890
|
+
* To extract the plain text, parse the returned HTML (e.g. strip tags).
|
|
891
|
+
*
|
|
889
892
|
* @param params - Request parameters
|
|
890
893
|
*/
|
|
891
894
|
text(params) {
|
|
892
895
|
return this.#http.get(
|
|
893
896
|
"/webview/v2/novel",
|
|
894
|
-
|
|
897
|
+
// The webview endpoint uses the query parameter 'id', not 'novel_id'
|
|
898
|
+
buildParams({ id: params.novelId })
|
|
895
899
|
);
|
|
896
900
|
}
|
|
897
901
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -1248,10 +1248,10 @@ interface NovelDetailParams {
|
|
|
1248
1248
|
/** ID of the novel to fetch. */
|
|
1249
1249
|
novelId: number;
|
|
1250
1250
|
}
|
|
1251
|
-
/** Parameters for fetching
|
|
1251
|
+
/** Parameters for fetching the WebView HTML of a novel. */
|
|
1252
1252
|
interface NovelTextParams {
|
|
1253
|
-
/** ID of the novel whose
|
|
1254
|
-
|
|
1253
|
+
/** ID of the novel whose WebView HTML to fetch. */
|
|
1254
|
+
novelId: number;
|
|
1255
1255
|
}
|
|
1256
1256
|
/** Parameters for fetching related novels. */
|
|
1257
1257
|
interface NovelRelatedParams {
|
|
@@ -1330,9 +1330,12 @@ declare class NovelResource {
|
|
|
1330
1330
|
*/
|
|
1331
1331
|
detail(params: NovelDetailParams): ResultAsync<NovelDetailResponse, PixivError>;
|
|
1332
1332
|
/**
|
|
1333
|
-
* Fetches the
|
|
1333
|
+
* Fetches the WebView HTML for a novel.
|
|
1334
1334
|
* GET /webview/v2/novel
|
|
1335
1335
|
*
|
|
1336
|
+
* Returns the raw HTML page that the pixiv app renders in a WebView.
|
|
1337
|
+
* To extract the plain text, parse the returned HTML (e.g. strip tags).
|
|
1338
|
+
*
|
|
1336
1339
|
* @param params - Request parameters
|
|
1337
1340
|
*/
|
|
1338
1341
|
text(params: NovelTextParams): ResultAsync<string, PixivError>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1248,10 +1248,10 @@ interface NovelDetailParams {
|
|
|
1248
1248
|
/** ID of the novel to fetch. */
|
|
1249
1249
|
novelId: number;
|
|
1250
1250
|
}
|
|
1251
|
-
/** Parameters for fetching
|
|
1251
|
+
/** Parameters for fetching the WebView HTML of a novel. */
|
|
1252
1252
|
interface NovelTextParams {
|
|
1253
|
-
/** ID of the novel whose
|
|
1254
|
-
|
|
1253
|
+
/** ID of the novel whose WebView HTML to fetch. */
|
|
1254
|
+
novelId: number;
|
|
1255
1255
|
}
|
|
1256
1256
|
/** Parameters for fetching related novels. */
|
|
1257
1257
|
interface NovelRelatedParams {
|
|
@@ -1330,9 +1330,12 @@ declare class NovelResource {
|
|
|
1330
1330
|
*/
|
|
1331
1331
|
detail(params: NovelDetailParams): ResultAsync<NovelDetailResponse, PixivError>;
|
|
1332
1332
|
/**
|
|
1333
|
-
* Fetches the
|
|
1333
|
+
* Fetches the WebView HTML for a novel.
|
|
1334
1334
|
* GET /webview/v2/novel
|
|
1335
1335
|
*
|
|
1336
|
+
* Returns the raw HTML page that the pixiv app renders in a WebView.
|
|
1337
|
+
* To extract the plain text, parse the returned HTML (e.g. strip tags).
|
|
1338
|
+
*
|
|
1336
1339
|
* @param params - Request parameters
|
|
1337
1340
|
*/
|
|
1338
1341
|
text(params: NovelTextParams): ResultAsync<string, PixivError>;
|
package/dist/index.js
CHANGED
|
@@ -881,15 +881,19 @@ var NovelResource = class {
|
|
|
881
881
|
);
|
|
882
882
|
}
|
|
883
883
|
/**
|
|
884
|
-
* Fetches the
|
|
884
|
+
* Fetches the WebView HTML for a novel.
|
|
885
885
|
* GET /webview/v2/novel
|
|
886
886
|
*
|
|
887
|
+
* Returns the raw HTML page that the pixiv app renders in a WebView.
|
|
888
|
+
* To extract the plain text, parse the returned HTML (e.g. strip tags).
|
|
889
|
+
*
|
|
887
890
|
* @param params - Request parameters
|
|
888
891
|
*/
|
|
889
892
|
text(params) {
|
|
890
893
|
return this.#http.get(
|
|
891
894
|
"/webview/v2/novel",
|
|
892
|
-
|
|
895
|
+
// The webview endpoint uses the query parameter 'id', not 'novel_id'
|
|
896
|
+
buildParams({ id: params.novelId })
|
|
893
897
|
);
|
|
894
898
|
}
|
|
895
899
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@book000/pixivts",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.1",
|
|
4
4
|
"description": "pixiv Unofficial API Library for TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pixiv",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "24.13.2",
|
|
44
44
|
"@vitest/coverage-v8": "3.2.4",
|
|
45
|
-
"msw": "2.
|
|
45
|
+
"msw": "2.14.6",
|
|
46
46
|
"tsup": "8.5.0",
|
|
47
47
|
"typedoc": "^0.28.19",
|
|
48
48
|
"typescript": "6.0.3",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"build:dts-guard": "node ../../scripts/check-dts-no-zod.mjs",
|
|
55
55
|
"clean": "rimraf dist",
|
|
56
56
|
"generate-docs": "typedoc",
|
|
57
|
-
"lint": "tsc
|
|
57
|
+
"lint": "tsc -p tsconfig.test.json",
|
|
58
58
|
"fix": "echo 'no fix needed'",
|
|
59
59
|
"test:e2e": "vitest run --config vitest.e2e.config.ts"
|
|
60
60
|
}
|