Skip to content

Latest commit

 

History

History
89 lines (68 loc) · 1.92 KB

[클립] 클립 조회.md

File metadata and controls

89 lines (68 loc) · 1.92 KB

클립 조회

클립 하나를 조회 합니다.

  • URL

    /clip/int:clip_id

  • Method:

    | GET |

  • URL Params

    Required:

    N/A

    Optional:

    N/A

  • Data Params

    N/A

    Optional: N/A

  • Success Response:

    • Code: 200
      Content: [[최신 클립 데이터 구조|structure_clip]]
      {
          "id": 148, 
          "video_id": "124765813", 
          "title": "버스킹 클립 제목", 
          "body": "클립 본문", 
          "likes": 1, 
          "live": false, 
          "hearts": 1, 
          "author_id": 185, 
          "category_id": null, 
          "created_at": "2019-05-20 10:21:57", 
          "likers": [
                  {"id": 187, "google_id": 187, "name": "reporter", "google_picture": "http://test-img.jpg", "followers": 0}
              ], 
          "heart_ranking": [
                  {"user": 
                      {
                          "id": 113, 
                          "google_id": 113, 
                          "name": "recordable542", 
                          "google_picture": "https://lh4.googleusercontent.com/-ufC0a8TTdN4/AAAAAAAAAAI/AAAAAAAABjA/C6tCvQDtOe8/photo.jpg", 
                          "followers": 0
                      }, 
                      "heart": 1000
                  }
              ], 
          "comment_cnt": 1, 
          "has_liked": true, 
          "has_hearted": true, 
          "has_bookmarked": true
      }
      has_liked, has_hearted, has_bookmarked 는 요청한 유저를 기준으로 자신이 좋아요를 했는지, 하트를 주었는지, 앨범에 (하나라도) 저장했는지 여부를 리턴합니다.
  • Error Response:

    • Code: HTTP_404_NOT_FOUND
      Content:
          {
              "okay": false,
              "msg": "object not found"
          }
      해당 id의 clip 이 존재하지 않는 경우
  • Sample Call:

  • Notes: