import{_ as s,c as a,a as e,o as n}from"./app-Dgsdh8A6.js";const l={};function d(o,t){return n(),a("div",null,t[0]||(t[0]=[e(`<h1 id="直播心跳上报" tabindex="-1"><a class="header-anchor" href="#直播心跳上报"><span>直播心跳上报</span></a></h1><h2 id="直播心跳-web端" tabindex="-1"><a class="header-anchor" href="#直播心跳-web端"><span>直播心跳 (Web端)</span></a></h2><blockquote><p>https://live-trace.bilibili.com/xlive/rdata-interface/v1/heartbeat/webHeartBeat</p></blockquote><p><em>请求方式: GET</em></p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>hb</td><td>str</td><td>heartbeat 正文</td><td>不必要</td><td>使用 base64 编码</td></tr><tr><td>pf</td><td>str</td><td>平台名称</td><td>不必要</td><td>可为 <code>web</code></td></tr></tbody></table><p><code>hb</code> 解码参数:</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>num</td><td>上次返回的 next_interval 值</td><td>默认 60</td></tr><tr><td>1</td><td>num</td><td>真实直播间号</td><td></td></tr><tr><td>2</td><td>num</td><td>1</td><td>作用尚不明确</td></tr><tr><td>3</td><td>num</td><td>0</td><td>作用尚不明确</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td></td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>next_interval</td><td>num</td><td>下次心跳间隔</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><p>上报直播间 26863308 的心跳</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://live-trace.bilibili.com/xlive/rdata-interface/v1/heartbeat/webHeartBeat&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;hb=$(</span><span style="color:#DCDCAA;">echo</span><span style="color:#CE9178;"> &quot;60|26863308|1|0&quot; </span><span style="color:#D4D4D4;">|</span><span style="color:#DCDCAA;"> base64</span><span style="color:#CE9178;"> -)&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;pf=web&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;next_interval&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">60</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,17)]))}const p=s(l,[["render",d]]),c=JSON.parse('{"path":"/docs/live/report.html","title":"直播心跳上报","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1724238159000,"contributors":[{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":1,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"60a0c5d1a2f44fe61335da04571305fa7727a968","time":1724238159000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"feat: 各种接口补充与错误修正 (#1066)"}]},"filePathRelative":"docs/live/report.md"}');export{p as comp,c as data};
