API說明

API位置 /new_ezding/comments/{parent_id}
需求描述 取得指定評論的回覆清單,一次顯示3筆
傳輸物件格式 json
方法 GET

範例

curl -X GET   \
-H " X-Ftcsys-key: {KEY}" \
-H " X-Ftc-Authorization: {token}"  \(<-user有登入才帶)
-H " X- Accept-Language: {language}" \
-H "Content-Type: application/json" \
https://{endpoint}/new_ezding/comments/{parent_id}?comment_type=1&valid=1

回傳範例

{
  "result": {
    "total_pages": 10,
    "total_records": 100,
    "page": 1,
    "list": [
      {
        "comment_id": 1,
        "photo_url": "http://member_center.fullerton.com.tw/ member/images/1b47c492287211e69b8d6f151a450c6d.jpg",
        "nickname": "stevn",
        "score": "",
        "comment": "喜歡❤️",
        "bookmark_status": 1,
        "bookmark_count": 55,
        "created_time": 1487839684000,
        "reply": {
          "total_pages": 10,
          "total_records": 10,
          "page": 2,
          "list": [
            {
              "comment_id": 2,
              "photo_url": "http://member_center.fullerton.com.tw/ member/images/40288eb0050f542401050f54d74c0003.jpg",
              "nickname": "安安",
              "score": "",
              "coment": "還不錯啊",
              "bookmark_status": 1,
              "bookmark_count": 55,
              "created_time": 1487839688000
            },
            {
              "comment_id": 3,
              "photo_url": "http://member_center.fullerton.com.tw/ member/images/40288eb0050f542401050f54f5461de4.jpg",
              "nickname": "有夠蝦",
              "score": "",
              "coment": "還不錯啊",
              "bookmark_status": 1,
              "bookmark_count": 55,
              "created_time": 1487839688000
            }
          ]
        }
      },
      {
        "comment_id": 4,
        "photo_url": "http://member_center.fullerton.com.tw/ member/images/40288eb0050f542401050f54fc832689.jpg",
        "nickname": "為什麼",
        "score": "",
        "comment": "喜歡❤️",
        "bookmark_status": 1,
        "bookmark_count": 55,
        "created_time": 1487839684000,
        "reply": []
      }
    ]
  },
  "code": 200,
  "status": "success"
}

接收URL參數

參數 名稱 範例 必填 備註
parent_id 第1層評論ID 1 Y
comment_type 評論類型 1 Y 1:電影評論、2:站台內容評論
page 所在頁數 1 N
page_size 每頁要求的資料筆數 3 N 預設回傳前3筆留言
valid 資料狀態 1 N 1:傳回有效資料、0:傳回全部資料

回傳json的參數

參數 名稱 範例 必填 備註
total_pages 總頁數 10 Y
total_records 結果筆數 100 Y
page 頁碼 1 Y
list 評論的回覆清單 Y
comment_id 評論ID 2 Y
photo_url 會員頭像 http://member_center.fullerton.com.tw/ member/images/40288eb0050f542401050f54d74c0003.jpg Y
nickname 使用者暱稱 00001 Y
score 會員評分 null N 第2層回覆評論沒有評分,給null
comment 評論內容 很好喔 Y
bookmark_status 是否收藏狀態 1 N 1:是、0:否,未登入時皆為否
bookmark_count 被收藏數 10 Y
created_time 建立時間 1487839688000 Y

results matching ""

    No results matching ""