Skip to content

Like API Specification

BangDori edited this page May 16, 2024 · 11 revisions
κΈ°λŠ₯ λ©”μ„œλ“œ URI λΉ„κ³ 
ν”Όλ“œ μ’‹μ•„μš” 쑰회 GET /feeds/{feed_id}/likes ❌
ν”Όλ“œ μ’‹μ•„μš” PUT /feeds/{feed_id}/likes βœ…
ν”Όλ“œ μ’‹μ•„μš” μ·¨μ†Œ DELETE /feeds/{feed_id}/likes βœ…

1️⃣ ν”Όλ“œ μ’‹μ•„μš” 쑰회

interface Request {
  uri: '/feeds/{feed_id}/likes';
  method: 'GET';
  body: {};
}

interface Response {
  code: '2000';
  data: {
    like: {
      totalCount: number;
      isLiked: boolean;
    };
  };
}

2️⃣ ν”Όλ“œ μ’‹μ•„μš”

interface Request {
  uri: '/feeds/{feed_id}/likes';
  method: 'PUT';
  body: {};
}

interface Response {
  code: '2000';
  data: {
    isLiked: boolean;
  };
}

3️⃣ ν”Όλ“œ μ’‹μ•„μš” μ·¨μ†Œ

interface Request {
  uri: '/feeds/{feed_id}/likes';
  method: 'DELETE';
  body: {};
}

interface Response {
  code: '2000';
  body: {
    isLiked: boolean;
  };
}