Improve API definition

This commit is contained in:
syuilo 2019-04-25 12:56:52 +09:00
parent 867eb41618
commit da9dd7c423
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 28 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import define from '../../define';
import { fetchMeta } from '../../../../misc/fetch-meta';
import { Notes } from '../../../../models';
import { Note } from '../../../../models/entities/note';
import { types, bool } from '../../../../misc/schema';
/*
a分間のユニーク投稿数が今からa分前b分前の間のユニーク投稿数のn倍以上5
@ -21,6 +22,33 @@ export const meta = {
tags: ['hashtags'],
requireCredential: false,
res: {
type: types.array,
optional: bool.false, nullable: bool.false,
items: {
type: types.object,
optional: bool.false, nullable: bool.false,
properties: {
tag: {
type: types.string,
optional: bool.false, nullable: bool.false,
},
chart: {
type: types.array,
optional: bool.false, nullable: bool.false,
items: {
type: types.number,
optional: bool.false, nullable: bool.false,
}
},
usersCount: {
type: types.number,
optional: bool.false, nullable: bool.false,
}
}
}
}
};
export default define(meta, async () => {