16.메시지 통계 가져오기

메시지 통계 정보를 가져온다. 메시지 타입에 따라 데이터가 다르게 온다. custom_types 파라미터에 따라 셀러가 보낸 메시지의 개수 또는 사용자가 보낸 메시지의 개수가 응답한다.

GET /api/2/applications/{app_key}/videos/{video_key}/stats

경로 변수

타입필수여부설명
app_keyStringtrue애플리케이션 키
video_keyStringtrue비디오 키

요청 파라미터

타입필수여부설명
typeStringtruemessage 만 사용 가능
message_typesStringtrueMESSAGE, DM 만 사용 가능. 여러 개를 요청할 경우 ,(콤마)를 이용해 붙여서 사용한다.
custom_typesStringtrue메시지의 확장 타입. 셀러의 메시지 수는 MANAGER, ANSWER 사용하고, 사용자의 메시지 수는 NORMAL, QUESTION을 사용할 수 있다.

응답 본문

메시지 통계 객체

타입설명
total_message_countlong요청한 타입의 채팅 메시지 수

요청 예

설명
GEThttps://api.flipflop.tv/api/2/applications/SAMPLE_APP/videos/100000/stats?type=message&message_types=MESSAGE&custom_types=MANAGER&custom_types=ANSWER
HeaderAuthorization: Bearer {access_token}
Accept: application/json

응답 예

Http Status설명
200{"video_key": "a10000", "url": "{broadcast_host_url}/10000/index.m3u8", "thumbnail_url": "{thumbnail_host_url}/videos/10000/thumbnail.jpg?time=1619480079775", "state": "LIVE" }}
400{"code": 40000, "message": "Invalid user_id: valid value of 'user_id' is range 1 to 80."}