From ad02dae34cd43042381957e11f3da55fe2aedb1c Mon Sep 17 00:00:00 2001 From: deflis Date: Sun, 11 Jan 2026 23:13:52 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6=E7=89=88?= =?UTF-8?q?=E3=81=AErankingHistory=E9=96=A2=E6=95=B0=E3=81=ABoptions?= =?UTF-8?q?=E3=83=91=E3=83=A9=E3=83=A1=E3=83=BC=E3=82=BF=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ExecuteOptions型をインポート - api.executeRankingHistoryにoptionsを渡すよう修正 --- src/index.browser.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.browser.ts b/src/index.browser.ts index 408eecf..2ead57a 100644 --- a/src/index.browser.ts +++ b/src/index.browser.ts @@ -1,4 +1,5 @@ import type NarouNovel from "./narou.js"; +import type { ExecuteOptions } from "./narou.js"; import NarouNovelJsonp from "./narou-jsonp.js"; import SearchBuilder from "./search-builder.js"; import SearchBuilderR18 from "./search-builder-r18.js"; @@ -67,13 +68,16 @@ export function ranking(api: NarouNovel = narouNovelJsonp): RankingBuilder { /** * なろう殿堂入り API でランキング履歴を取得する * @param {string} ncode 小説のNコード + * @param {ExecuteOptions} [options] 実行オプション + * @param {NarouNovel} [api] API実行クラスのインスタンス * @see https://dev.syosetu.com/man/rankinapi/ */ export async function rankingHistory( ncode: string, + options?: ExecuteOptions, api: NarouNovel = narouNovelJsonp ): Promise { - const result = await api.executeRankingHistory({ ncode }); + const result = await api.executeRankingHistory({ ncode }, options); if (Array.isArray(result)) { return result.map(formatRankingHistory); } else {