rudeshark.net/src/server/api/endpoints/endpoints.ts

36 lines
675 B
TypeScript
Raw Normal View History

2019-04-18 14:29:19 +02:00
import define from '../define';
import endpoints from '../endpoints';
export const meta = {
desc: {
'ja-JP': '使用できるAPI一覧を返します。',
'en-US': 'Returns a list of available APIs.'
},
2020-02-15 13:33:32 +01:00
requireCredential: false as const,
2019-04-18 14:29:19 +02:00
tags: ['meta'],
params: {
},
res: {
type: 'array' as const,
optional: false as const, nullable: false as const,
items: {
type: 'string' as const,
optional: false as const, nullable: false as const
},
example: [
'admin/abuse-user-reports',
'admin/accounts/create',
'admin/announcements/create',
'...'
]
}
2019-04-18 14:29:19 +02:00
};
export default define(meta, async () => {
return endpoints.map(x => x.name);
});