api-config.json 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. {
  2. "name": "douyin-comment-replies",
  3. "displayName": "抖音评论回复查询",
  4. "description": "获取抖音指定视频中某条评论的全部回复,适用于深度舆情追踪、争议点分析、用户回复习惯研究。常配合 douyin-video-comments 使用。",
  5. "category": "douyin",
  6. "version": "1.3.0",
  7. "endpoint": {
  8. "method": "GET",
  9. "url": "https://server.fmode.cn/api/voc-social/douyin/app/v3/fetch_video_comment_replies",
  10. "headers": {
  11. "Authorization": "Bearer r:a5a19ea9868043b15d9b10423234ca43",
  12. "Accept": "application/json"
  13. }
  14. },
  15. "parameters": {
  16. "type": "object",
  17. "required": [
  18. "item_id",
  19. "comment_id"
  20. ],
  21. "properties": {
  22. "item_id": {
  23. "type": "string",
  24. "description": "抖音作品 ID"
  25. },
  26. "comment_id": {
  27. "type": "string",
  28. "description": "评论 ID"
  29. },
  30. "cursor": {
  31. "type": "integer",
  32. "description": "分页游标,首次传 0",
  33. "default": 0
  34. },
  35. "count": {
  36. "type": "integer",
  37. "description": "每页数量,请保持默认 20",
  38. "default": 20
  39. }
  40. }
  41. },
  42. "requestTransform": {
  43. "queryParams": {
  44. "item_id": "{{item_id}}",
  45. "comment_id": "{{comment_id}}",
  46. "cursor": "{{cursor}}",
  47. "count": "{{count}}"
  48. }
  49. },
  50. "response": {
  51. "type": "object",
  52. "description": "评论回复列表",
  53. "properties": {
  54. "comments": {
  55. "type": "array",
  56. "description": "回复列表"
  57. },
  58. "has_more": {
  59. "type": "boolean",
  60. "description": "是否有更多回复"
  61. },
  62. "cursor": {
  63. "type": "integer",
  64. "description": "下一页游标"
  65. }
  66. }
  67. },
  68. "usageExamples": [
  69. {
  70. "name": "热评争议点深度分析",
  71. "input": {
  72. "item_id": "7354666303006723354",
  73. "comment_id": "7354669356632638218",
  74. "cursor": 0,
  75. "count": 20
  76. },
  77. "description": "获取高赞热评下的回复,分析用户争议点和进一步讨论的内容"
  78. }
  79. ],
  80. "workflow": {
  81. "description": "推荐调用链",
  82. "steps": [
  83. "上游: douyin-video-comments(aweme_id) → 获取评论列表 → 找到高赞热评(digg_count 最高)",
  84. "本步: douyin-comment-replies(item_id, comment_id) → 获取热评下的回复",
  85. "分析: 对回复内容做情感分类,发现用户争议点"
  86. ]
  87. },
  88. "reportMapping": {
  89. "slides": [
  90. "社媒聆听(Slide14)"
  91. ],
  92. "dataPoints": [
  93. "用户争议点内容",
  94. "热评下用户情感深度",
  95. "购买决策影响因素(对话式评论)"
  96. ]
  97. },
  98. "timeout": 60000,
  99. "retry": {
  100. "maxAttempts": 3,
  101. "delay": 1500,
  102. "backoffMultiplier": 2
  103. },
  104. "tokenConfig": {
  105. "type": "bearer",
  106. "configFile": "~/.openclaw/voc-credentials.json",
  107. "tokenField": "vocToken",
  108. "currentToken": "r:858b3ee92314d5447d1fc3cdc10462d7",
  109. "resolutionOrder": [
  110. "configFile",
  111. "currentToken"
  112. ],
  113. "apigId": "Vo3ROWEvDy",
  114. "paymentUrlResolution": {
  115. "description": "动态构建充值URL:通过当前token查出用户objectId,拼接到充值页面",
  116. "steps": [
  117. "1. 从 voc-credentials.json 或 currentToken 获取当前 session token",
  118. "2. 调用 GET https://server.fmode.cn/parse/users/me (Header: X-Parse-Application-Id: ncloudmaster, X-Parse-Session-Token: {token})获取用户 objectId",
  119. "3. 拼接充值URL: https://app.fmode.cn/dev/apig-pay/?user={objectId}&apigid=Vo3ROWEvDy&fun_id=HOkkX72PMF",
  120. "4. 将该URL展示给用户,引导扫码支付"
  121. ],
  122. "userResolveEndpoint": "https://server.fmode.cn/parse/users/me",
  123. "userResolveHeaders": {
  124. "X-Parse-Application-Id": "ncloudmaster",
  125. "X-Parse-Session-Token": "{vocToken}"
  126. },
  127. "paymentBaseUrl": "https://app.fmode.cn/dev/apig-pay/",
  128. "paymentParams": {
  129. "user": "{resolvedUserId}",
  130. "apigid": "Vo3ROWEvDy",
  131. "fun_id": "HOkkX72PMF"
  132. },
  133. "balanceCheckEndpoint": "https://server.fmode.cn/api/apig/getApig"
  134. },
  135. "onMissing": {
  136. "action": "resolveUserThenShowPayment",
  137. "title": "扫码开通 VOC-AI 数据服务",
  138. "message": "此 Skill 需要有效的 API Token。请按以下步骤操作:\n1. 如果你已有 Token,请告诉我,我会保存到 ~/.openclaw/voc-credentials.json\n2. 如果没有 Token,我会引导你扫码充值开通"
  139. },
  140. "onBalanceInsufficient": {
  141. "action": "resolveUserThenShowPayment",
  142. "title": "VOC-AI Token 余额不足,请扫码充值",
  143. "message": "当前 Token 余额不足,我将为你生成专属充值链接,扫码支付后即可继续使用。"
  144. }
  145. },
  146. "errorHandling": {
  147. "balanceInsufficient": {
  148. "conditions": [
  149. {
  150. "responseField": "code",
  151. "operator": "in",
  152. "value": [
  153. -2,
  154. -3,
  155. -10,
  156. 402,
  157. 429
  158. ]
  159. },
  160. {
  161. "responseField": "msg",
  162. "operator": "contains",
  163. "value": [
  164. "余额不足",
  165. "insufficient",
  166. "balance",
  167. "quota"
  168. ]
  169. },
  170. {
  171. "responseField": "message",
  172. "operator": "contains",
  173. "value": [
  174. "余额不足",
  175. "insufficient",
  176. "balance"
  177. ]
  178. }
  179. ],
  180. "matchMode": "any",
  181. "trigger": "tokenConfig.onBalanceInsufficient"
  182. },
  183. "unauthorized": {
  184. "conditions": [
  185. {
  186. "responseField": "code",
  187. "operator": "in",
  188. "value": [
  189. 401,
  190. 403
  191. ]
  192. },
  193. {
  194. "responseField": "msg",
  195. "operator": "contains",
  196. "value": [
  197. "unauthorized",
  198. "token",
  199. "invalid",
  200. "auth"
  201. ]
  202. }
  203. ],
  204. "matchMode": "any",
  205. "trigger": "tokenConfig.onMissing"
  206. }
  207. }
  208. }