Skip to content

Commit

Permalink
docs: add URLs and improve ranking docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowAgar25 committed Nov 22, 2024
1 parent 14d49ee commit 66cefc9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
1 change: 1 addition & 0 deletions lib/routes/syosetu/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const route: Route = {
supportScihub: false,
},
name: 'なろう小説 API の更新履歴',
url: 'dev.syosetu.com',
maintainers: ['SnowAgar25'],
handler,
radar: [
Expand Down
8 changes: 6 additions & 2 deletions lib/routes/syosetu/ranking-r18.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const route: Route = {
supportScihub: false,
},
name: 'R18 Rankings',
url: 'syosetu.com/site/group',
maintainers: ['SnowAgar25'],
handler,
description: `
Expand All @@ -90,13 +91,16 @@ export const route: Route = {
| yearly | Yearly Ranking | 年間ランキング |
| Novel Type | Description | 説明 |
| --- | --- | --- | --- |
| --- | --- | --- |
| total | All Works | 総合 |
| t | Short Stories | 短編 |
| r | Ongoing Series | 連載中 |
| er | Completed Series | 完結済 |
Note: Combine Period and Novel Type with \`_\`. For example: \`daily_total\`, \`weekly_r\`, \`monthly_er\``,
:::tip
Combine Period and Novel Type with \`_\`.
For example: \`daily_total\`, \`weekly_r\`, \`monthly_er\`
:::`,
radar: [
{
source: ['noc.syosetu.com/rank/list/type/:type'],
Expand Down
39 changes: 25 additions & 14 deletions lib/routes/syosetu/ranking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ const getParameters = () => {
...periodOptions.flatMap((period) =>
novelTypeOptions.map((novelType) => ({
value: `${period.value}_${novelType.value}`,
label: `${RankingType.LIST}: [${periodToJapanese[period.value]}] 総合ランキング - ${novelTypeToJapanese[novelType.value]}`,
label: `${RankingType.LIST} - [${periodToJapanese[period.value]}] 総合ランキング - ${novelTypeToJapanese[novelType.value]}`,
}))
),
// Genre ranking options
...periodOptions.flatMap((period) =>
genreOptions.flatMap((genre) =>
novelTypeOptions.map((novelType) => ({
value: `${period.value}_${genre.value}_${novelType.value}`,
label: `${RankingType.GENRE}: [${periodToJapanese[period.value]}] ${GenreNotation[genre.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`,
label: `${RankingType.GENRE} - [${periodToJapanese[period.value]}] ${GenreNotation[genre.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`,
}))
)
),
Expand All @@ -73,7 +73,7 @@ const getParameters = () => {
isekaiOptions.flatMap((category) =>
novelTypeOptions.map((novelType) => ({
value: `${period.value}_${category.value}_${novelType.value}`,
label: `${RankingType.ISEKAI}: [${periodToJapanese[period.value]}] 異世界転生/転移${isekaiCategoryToJapanese[category.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`,
label: `${RankingType.ISEKAI} - [${periodToJapanese[period.value]}] 異世界転生/転移${isekaiCategoryToJapanese[category.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`,
}))
)
),
Expand Down Expand Up @@ -123,18 +123,16 @@ export const route: Route = {
supportScihub: false,
},
name: 'Rankings',
url: 'yomou.syosetu.com/rank/top',
maintainers: ['SnowAgar25'],
handler,
description: `
Support various ranking types:
1. 総合ランキング \`list\`
2. ジャンル別ランキング \`genre\`
3. 異世界転生/転移ランキング \`isekai\`
| Keyword | Description | 説明 |
| --- | --- | --- |
| list | Overall Ranking | 総合ランキング |
| genre | Genre Ranking | ジャンル別ランキング |
| isekai | Isekai/Reincarnation/Transfer Ranking | 異世界転生/転移ランキング |
Note: The "注目度ランキング" (Attention Ranking) is not supported as syosetu does not provide a public API for this feature and the results cannot be replicated through the search API.
注意事項:「注目度ランキング」については、API が非公開で検索 API でも同様の結果を得ることができないため、本 Route ではサポートしておりません。
Period options:
| Period | Description |
| --- | --- |
| daily | Daily Ranking |
Expand All @@ -143,18 +141,31 @@ Period options:
| quarter | Quarterly Ranking |
| yearly | Yearly Ranking |
Novel type options (not all available for every ranking):
| Type | Description |
| --- | --- |
| total | All Works |
| t | Short Stories |
| r | Ongoing Series |
| er | Completed Series |
For \`isekai\` ranking type:
:::warning
Please note that novel type options may vary depending on the ranking category.
ランキングの種類によって、小説タイプが異なる場合がございますのでご注意ください。
:::
:::danger 注意事項
The "注目度ランキング" (Attention Ranking) is not supported as syosetu does not provide a public API for this feature and the results cannot be replicated through the search API.
「注目度ランキング」については、API が非公開で検索 API でも同様の結果を得ることができないため、本 Route ではサポートしておりません。
:::
:::tip 異世界転生/転移ランキングについて (Isekai)
When multiple works have the same points, their order may differ from syosetu's ranking as syosetu randomizes the order for works with identical points.
異世界転生/転移ランキングについて:
集計の結果、同じポイントの作品が複数存在する場合、Syosetu ではランダムで順位が決定されるため、本 Route の順位と異なる場合があります。
:::
`,
radar: [
{
Expand Down

0 comments on commit 66cefc9

Please sign in to comment.