From b357bccb988400e2c53fb0da330790997f226579 Mon Sep 17 00:00:00 2001 From: taizan-hokuto <55448286+taizan-hokuto@users.noreply.github.com> Date: Fri, 20 Dec 2019 23:57:10 +0900 Subject: [PATCH] Add test json --- tests/testdata/chat.json | 164 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 tests/testdata/chat.json diff --git a/tests/testdata/chat.json b/tests/testdata/chat.json new file mode 100644 index 0000000..1894dfa --- /dev/null +++ b/tests/testdata/chat.json @@ -0,0 +1,164 @@ +{ + "timing": { + "info": { + "st": 164 + } + }, + "csn": "", + "response": { + "responseContext": { + "serviceTrackingParams": [{ + "service": "CSI", + "params": [{ + "key": "GetLiveChat_rid", + "value": "" + }, { + "key": "c", + "value": "WEB" + }, { + "key": "cver", + "value": "2.20191219.03.01" + }, { + "key": "yt_li", + "value": "0" + }] + }, { + "service": "GFEEDBACK", + "params": [{ + "key": "e", + "value": "" + }, { + "key": "logged_in", + "value": "0" + }] + }, { + "service": "GUIDED_HELP", + "params": [{ + "key": "logged_in", + "value": "0" + }] + }, { + "service": "ECATCHER", + "params": [{ + "key": "client.name", + "value": "WEB" + }, { + "key": "client.version", + "value": "2.2" + }, { + "key": "innertube.build.changelist", + "value": "228" + }, { + "key": "innertube.build.experiments.source_version", + "value": "2858" + }, { + "key": "innertube.build.label", + "value": "youtube.ytfe.innertube_" + }, { + "key": "innertube.build.timestamp", + "value": "154" + }, { + "key": "innertube.build.variants.checksum", + "value": "e" + }, { + "key": "innertube.run.job", + "value": "ytfe-innertube-replica-only.ytfe" + }] + }], + "webResponseContextExtensionData": { + "ytConfigData": { + "csn": "ADw", + "visitorData": "%3D%3D" + } + } + }, + "continuationContents": { + "liveChatContinuation": { + "continuations": [{ + "timedContinuationData": { + "timeoutMs": 10000, + "continuation": "continuation" + } + }], + "actions": [{ + "addChatItemAction": { + "item": { + "liveChatTextMessageRenderer": { + "message": { + "runs": [{ + "text": "message" + }] + }, + "authorName": { + "simpleText": "authorName" + }, + "authorPhoto": { + "thumbnails": [{ + "url": "https://yt3.ggpht.com/photo.jpg", + "width": 32, + "height": 32 + }, { + "url": "https://yt3.ggpht.com/photo.jpg", + "width": 64, + "height": 64 + }] + }, + "contextMenuEndpoint": { + "commandMetadata": { + "webCommandMetadata": { + "ignoreNavigation": true + } + }, + "liveChatItemContextMenuEndpoint": { + "params": "params" + } + }, + "id": "id", + "timestampUsec": "1576851922945411", + "authorBadges": [{ + "liveChatAuthorBadgeRenderer": { + "customThumbnail": { + "thumbnails": [{ + "url": "https://yt3.ggpht.com/photo.jpg" + }, { + "url": "https://yt3.ggpht.com/photo.jpg" + }] + }, + "tooltip": "メンバー(6 か月)", + "accessibility": { + "accessibilityData": { + "label": "メンバー(6 か月)" + } + } + } + }], + "authorExternalChannelId": "UC", + "contextMenuAccessibility": { + "accessibilityData": { + "label": "コメントの操作" + } + } + } + }, + "clientId": "00000000000000000000" + } + } + ]} + }, + + "xsrf_token": "xsrf_token", + "url": "/live_chat/get_live_chat?continuation=0", + "endpoint": { + "commandMetadata": { + "webCommandMetadata": { + "url": "/live_chat/get_live_chat?continuation=0", + "rootVe": 0 + } + }, + "urlEndpoint": { + "url": "/live_chat/get_live_chat?continuation=0" + } + } + } +} + \ No newline at end of file