Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

v2apiを作る #290

Open
yupix opened this issue Oct 15, 2022 · 0 comments
Open

v2apiを作る #290

yupix opened this issue Oct 15, 2022 · 0 comments
Assignees
Labels
priority/medium🟡 topic/API🧩 Interface between server and client topic/performance📈 パフォーマンスに関連 topic/Server⚙ Server side specific issue/PR

Comments

@yupix
Copy link
Contributor

yupix commented Oct 15, 2022

何故

現状のAPIは多くがqueryなどを用いてもっと最適化できるから。

(例):

-POST /api/notes/renotes

-{
-noteId: 123
-limit: 10
-sinceId: 1
-untilId:1
-}

リノートの取得
+GET /api/notes/:id/renotes
+?limit=10&sinceId=1&untilId=1

リノートの作成
+POST /api/notes/:id/renotes

こうすることで同名のエンドポイントでありながら、複数のメソッドを持てるようになり、RESTFul APIらしい形になる

ayuskey v6でどこまでやるか

v6のリリースに時間がかかりすぎてる節があるので、とりあえずnotes関係の主要なapiまで作れれば良いと考えてる

採用技術

Nest.js

  • Nest.js側がこうしろとある程度決めてくれているので自分達で考えることが少なくて済む
  • TypeORMなどが比較的容易に使える

進みが悪い原因

  • チャート周り
  • ジョブキュー周り(bullをinjectすると循環インポートになる)
  • ap周り
@yupix yupix added topic/API🧩 Interface between server and client priority/medium🟡 topic/performance📈 パフォーマンスに関連 labels Oct 15, 2022
@yupix yupix self-assigned this Oct 15, 2022
@yupix yupix added this to ayuskey 6 Oct 15, 2022
@sousuke0422 sousuke0422 added the topic/Server⚙ Server side specific issue/PR label Oct 17, 2022
@yupix yupix moved this to In Progress in ayuskey 6 Oct 17, 2022
yupix added a commit that referenced this issue Oct 17, 2022
@sousuke0422 sousuke0422 removed this from ayuskey 6 Nov 3, 2022
@sousuke0422 sousuke0422 moved this to Todo in ayuskey 7 Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority/medium🟡 topic/API🧩 Interface between server and client topic/performance📈 パフォーマンスに関連 topic/Server⚙ Server side specific issue/PR
Projects
Status: Todo
Development

No branches or pull requests

2 participants