API說明

API位置 /new_ezding/comments/send_user_comment
需求描述 新增評分/評論
傳輸物件格式 json
方法 POST

範例

curl -X POST     \
-H " X-Ftcsys-key: {KEY}" \ 
-H " X-Ftc-Authorization: {token}" \
-H " X- Accept-Language: {language}" \
-H "Content-Type: application/json" \ 
-d '{
"comment_type": 1,
"reference_id": "c5516129d1e94c71841f09d3d18290e2",
"parent_id": 3,
"nickname": "可可",
"score": 4.5,
"comment": "不錯看"
}
https://{endpoint}/new_ezding/comments/send_user_comment

回傳範例

< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
{
  "result": "",
  "code": 200,
  "status": "success"
}

回傳錯誤-新增失敗

< HTTP/1.1 400 Bad Request
< Content-Type: application/json; charset=UTF-8
{
  "code": 400,
  "message": "新增失敗",
  "status": "failure"
}
HTTP回應碼 result 說明
200 "" 新增成功
400 "" 新增失敗
404.001 "" 無此內容(包含無此電影、無此文章、無此評論)
403.107 "" 參數錯誤、無效的token

接收json參數

參數 名稱 範例 必填 備註
comment_type 評論類型 1 Y 1:電影評論、2:站台內容
reference_id 關聯ID c5516129d1e94c71841f09d3d18290e2 Y comment_type=1->movie_id、comment_type=2->content_id
parent_id 上層評論ID 3 N 沒有傳的話就不要傳
nickname 使用者姓名 可可 Y
score 會員評分 4.5 N 若parent_id為0,score為必填;若parent_id非0,則score不需傳
comment 評論內容 很好喔 Y

results matching ""

    No results matching ""