Skip to content

Like API Specification

Suhwan Kim edited this page Nov 5, 2024 · 2 revisions
κΈ°λŠ₯ λ©”μ„œλ“œ URI λΉ„κ³ 
ν”Όλ“œ μ’‹μ•„μš” 쑰회 GET /v2/feeds/{feed_id}/likes ❌
ν”Όλ“œ μ’‹μ•„μš” PUT /v2/feeds/{feed_id}/likes ❌
ν”Όλ“œ μ’‹μ•„μš” μ·¨μ†Œ DELETE /v2/feeds/{feed_id}/likes ❌

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

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

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

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

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

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

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

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

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