Skip to content

Commit 1544524

Browse files
committed
READMEの内容を更新
- 特徴セクションを追加 - 対応APIのテーブルを追加 - インストール手順とクイックスタートを整理 - 開発セクションをpnpmに基づいて更新
1 parent 781c01c commit 1544524

1 file changed

Lines changed: 74 additions & 36 deletions

File tree

README.md

Lines changed: 74 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,74 @@
1-
# node-narou
1+
# 📚 node-narou
22

33
[![npm version](https://badge.fury.io/js/narou.svg)](https://badge.fury.io/js/narou)
44
[![Node.js CI](https://github.com/deflis/node-narou/actions/workflows/nodejs-test.yml/badge.svg)](https://github.com/deflis/node-narou/actions/workflows/nodejs-test.yml)
5-
65
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/deflis/node-narou)
76

8-
[なろうデベロッパー](https://dev.syosetu.com/)の API を fluent interface で利用できるラッパーライブラリです。
9-
ブラウザでの JSONP の利用も可能です。
7+
[なろうデベロッパー](https://dev.syosetu.com/)の API を fluent interface で利用できる TypeScript ライブラリです。
8+
A TypeScript wrapper library for Narou Developer APIs with fluent interface.
109

11-
以下の API をラップしています。
10+
## ✨ 特徴
1211

13-
- [なろう小説 API](https://dev.syosetu.com/man/api/)
14-
- [なろう小説ランキング API](https://dev.syosetu.com/man/rankapi/)
15-
- [なろう殿堂入り API](https://dev.syosetu.com/man/rankinapi/)
16-
- [なろう R18 小説 API](https://dev.syosetu.com/xman/api/)
12+
- 🔗 **メソッドチェーン対応**: 直感的な fluent interface で API を操作
13+
- 🌐 **マルチ環境対応**: Node.js とブラウザの両方で動作
14+
- 📝 **TypeScript 完全対応**: 型安全性と IntelliSense サポート
15+
- 🔀 **デュアル実装**: fetch (Node.js) と JSONP (ブラウザ) を自動選択
16+
- 📚 **全 API カバー**: なろうデベロッパーの全 API に対応
1717

18-
## Installation
18+
## 🚀 対応 API
1919

20-
以下のコマンドでインストールできます。
20+
| API | 説明 | 関数 |
21+
|-----|------|------|
22+
| [なろう小説 API](https://dev.syosetu.com/man/api/) | 小説の検索・絞り込み | `search()` |
23+
| [なろう小説ランキング API](https://dev.syosetu.com/man/rankapi/) | ランキング取得 | `ranking()` |
24+
| [なろう殿堂入り API](https://dev.syosetu.com/man/rankinapi/) | ランキング履歴取得 | `rankingHistory()` |
25+
| [なろう R18 小説 API](https://dev.syosetu.com/xman/api/) | 18禁小説検索 | `searchR18()` |
26+
| [なろうユーザ検索 API](https://dev.syosetu.com/man/userapi/) | ユーザー検索 | `searchUser()` |
2127

22-
```
28+
## 📦 インストール
29+
30+
```bash
31+
# 推奨: pnpm
32+
pnpm add narou
33+
34+
# または
2335
npm install narou
36+
yarn add narou
37+
```
38+
39+
## 🚀 クイックスタート
40+
41+
### Node.js での使用
42+
43+
```typescript
44+
import { search, ranking } from "narou";
45+
import { Genre, Order, RankingType } from "narou";
46+
47+
// 異世界恋愛小説を検索
48+
const result = await search("異世界")
49+
.genre(Genre.RenaiIsekai)
50+
.order(Order.FavoriteNovelCount)
51+
.limit(10)
52+
.execute();
53+
54+
console.log(`${result.allcount}件の小説が見つかりました`);
2455
```
2556

26-
## Usage - API
57+
### ブラウザでの使用
2758

28-
https://deflis.github.io/node-narou/ を参照してください。
59+
```typescript
60+
// ブラウザでは専用のインポートを使用(JSONP対応)
61+
import { search } from "narou/browser";
2962

30-
ブラウザで利用したい場合 `narou/browser` をimportしてください。こちらを利用することで自動的にfetch(nodejs)への依存がなくなり、JSONPを利用するようになります。
63+
const result = await search("魔法").execute();
64+
```
3165

32-
すでにサポート終了していますがfetchをサポートしないNode.jsバージョンで利用する場合は 、 `NarouNovelFetch` にfetchのNode.js実装を渡してください。
33-
なお、その場合の動作は確認していないので動かなければIssueを立ててください。
66+
## 📖 詳細な API ドキュメント
3467

68+
- **🔗 [完全な API ドキュメント](https://deflis.github.io/node-narou/)** - TypeDoc で生成された詳細なドキュメント
69+
- **🤖 [LLM 向けドキュメント](https://deflis.github.io/node-narou/llms.txt)** - AI/LLM が理解しやすい形式のドキュメント(TypeDoc JSON から自動生成)
3570

36-
## Example
71+
## 📝 使用例
3772

3873
```typescript
3974
import { search, ranking, rankingHistory, searchR18 } from "narou";
@@ -113,32 +148,35 @@ for (const novel of searchR18Result.values) {
113148
}
114149
```
115150

116-
## Development
117-
118-
```
119-
120-
# watch
151+
## 🛠️ 開発
121152

122-
npm run watch
153+
このプロジェクトでは pnpm を使用しています。
123154

124-
# build
155+
```bash
156+
# 依存関係のインストール
157+
pnpm install
125158

126-
npm run build
159+
# ビルド
160+
pnpm run build
127161

128-
# test
162+
# テスト実行
163+
pnpm run test
129164

130-
npm run test
165+
# 型チェック
166+
pnpm run check
131167

168+
# ドキュメント生成(TypeDoc + llms.txt)
169+
pnpm run docs
132170
```
133171

134-
## Contributing
172+
## 🤝 コントリビューション
135173

136-
1. Fork it!
137-
2. Create your feature branch: `git checkout -b my-new-feature`
138-
3. Commit your changes: `git commit -am 'Add some feature'`
139-
4. Push to the branch: `git push origin my-new-feature`
140-
5. Submit a pull request :D
174+
1. このリポジトリをフォーク
175+
2. フィーチャーブランチを作成: `git checkout -b my-new-feature`
176+
3. 変更をコミット: `git commit -am 'Add some feature'`
177+
4. ブランチにプッシュ: `git push origin my-new-feature`
178+
5. プルリクエストを作成
141179

142-
## License
180+
## 📄 ライセンス
143181

144-
MIT
182+
MIT License - 詳細は [LICENSE](LICENSE) ファイルを参照してください。

0 commit comments

Comments
 (0)