diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-25 12:56:52 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-25 12:56:52 +0900 |
| commit | da9dd7c42391af94d41e7f11aa59f59abfa4029a (patch) | |
| tree | 5d950197fd6663b308a533522bb683467c20f005 /src/server/api/endpoints | |
| parent | Fix #4415 (diff) | |
| download | sharkey-da9dd7c42391af94d41e7f11aa59f59abfa4029a.tar.gz sharkey-da9dd7c42391af94d41e7f11aa59f59abfa4029a.tar.bz2 sharkey-da9dd7c42391af94d41e7f11aa59f59abfa4029a.zip | |
Improve API definition
Diffstat (limited to 'src/server/api/endpoints')
| -rw-r--r-- | src/server/api/endpoints/hashtags/trend.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/api/endpoints/hashtags/trend.ts b/src/server/api/endpoints/hashtags/trend.ts index 84b750f2c1..05d571851e 100644 --- a/src/server/api/endpoints/hashtags/trend.ts +++ b/src/server/api/endpoints/hashtags/trend.ts @@ -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 () => { |