doc(route): japanpost add multi-language docs (#16092)
This commit is contained in:
parent
68c7430fbb
commit
b2abeef5a0
|
|
@ -1,6 +1,12 @@
|
|||
import type { Namespace } from '@/types';
|
||||
|
||||
export const namespace: Namespace = {
|
||||
name: 'Japanpost 日本郵便',
|
||||
name: 'Japanpost',
|
||||
url: 'trackings.post.japanpost.jp',
|
||||
zh: {
|
||||
name: '日本邮政',
|
||||
},
|
||||
ja: {
|
||||
name: '日本郵便',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
import { Route } from '@/types';
|
||||
import { track } from './track';
|
||||
|
||||
export const route: Route = {
|
||||
name: 'Track & Trace Service',
|
||||
path: '/track/:reqCode/:locale?',
|
||||
example: '/japanpost/track/EJ123456789JP/en',
|
||||
url: 'trackings.post.japanpost.jp/services/srv/search/',
|
||||
handler: track,
|
||||
categories: ['other'],
|
||||
maintainers: ['tuzi3040'],
|
||||
parameters: {
|
||||
reqCode: 'Package Number',
|
||||
locale: 'Language, default to japanese `ja`',
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
antiCrawler: false,
|
||||
supportRadar: false, // unsupported due to deprecation of `target` as a function in RSSHub-Radar 2.0.19
|
||||
supportBT: false,
|
||||
supportPodcast: false,
|
||||
supportScihub: false,
|
||||
},
|
||||
description: `| Japanese | English |
|
||||
| -------- | ------- |
|
||||
| ja | en |`,
|
||||
zh: {
|
||||
name: '邮件追踪查询',
|
||||
description: `| 日语 | 英语 |
|
||||
| ---- | ---- |
|
||||
| ja | en |`,
|
||||
},
|
||||
ja: {
|
||||
name: '郵便追跡サービス',
|
||||
description: `| 日本語 | 英語 |
|
||||
| ---- | ---- |
|
||||
| ja | en |`,
|
||||
},
|
||||
};
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
import { Route } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -11,28 +10,7 @@ import utils from './utils';
|
|||
let baseTitle = '日本郵便';
|
||||
const baseUrl = 'https://trackings.post.japanpost.jp/services/srv/search/direct?';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/track/:reqCode/:locale?',
|
||||
categories: ['other'],
|
||||
example: '/japanpost/track/EJ123456789JP/en',
|
||||
parameters: { reqCode: 'Package Number', locale: 'Language, default to japanese `ja`' },
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
antiCrawler: false,
|
||||
supportBT: false,
|
||||
supportPodcast: false,
|
||||
supportScihub: false,
|
||||
},
|
||||
name: 'Track & Trace Service 郵便追跡サービス',
|
||||
maintainers: ['tuzi3040'],
|
||||
handler,
|
||||
description: `| Japanese | English |
|
||||
| -------- | ------- |
|
||||
| ja | en |`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
export async function track(ctx) {
|
||||
const reqCode = ctx.req.param('reqCode');
|
||||
const reqReqCode = 'reqCodeNo1=' + reqCode;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue