Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Entry Star #6

Closed
NotFounds opened this issue Oct 12, 2018 · 5 comments
Closed

Entry Star #6

NotFounds opened this issue Oct 12, 2018 · 5 comments

Comments

@NotFounds
Copy link

Star

API

⭐️ をつける

POST /api/v1/stars

Query

  • thread_id
    • int
      • required
  • user_id
    • int
      • required

Response

  • Status: 200

⭐️ を消す

DELETE /api/v1/stars/:id

  • id
    • thread_id

Schema

name type remarks
id BIGINT
thread_id BIGINT
user_id BIGINT

thread_idとuser_idのペアはunique

@norma0b
Copy link
Contributor

norma0b commented Oct 12, 2018

bookmarkとstarって何が違うんですか

@ishowta
Copy link
Collaborator

ishowta commented Oct 24, 2018

idが分からないのでPOST /api/v1/starsはidを返すか、DELETE /api/v1/stars/:idと同じQueryを貰わないとだめそう

@tomoyaf
Copy link
Contributor

tomoyaf commented Oct 24, 2018

将来的には

  • Comment
  • Entry
  • User

を評価したくなる可能性があると考えると対象を指定したいかも
POST /api/v1/comments/:comment_id/star
DELETE /api/v1/comments/:comment_id/star/:star_id
みたいな感じ

@tomoyaf tomoyaf changed the title Star Entry Star Oct 24, 2018
@NotFounds
Copy link
Author

NotFounds commented Oct 24, 2018

Schema

name type remarks
id BIGINT
target_id BIGINT
user_id BIGINT

Target_kind

0 -> entry
1 -> comment

API

POST /api/v1/stars/:kind/:id
DELETE /api/v1/stars/:kind/:id

@tomoyaf
Copy link
Contributor

tomoyaf commented Oct 24, 2018

API

POST /api/v1/stars/entries/:entry_id
DELETE /api/v1/stars/entries/:entry_id

@ishowta ishowta added the Epic label Oct 31, 2018
@ishowta ishowta closed this as completed Oct 31, 2018
@ishowta ishowta reopened this Oct 31, 2018
@ishowta ishowta removed the Epic label Oct 31, 2018
@ishowta ishowta closed this as completed Nov 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants