import{_ as t,c as n,a,o as l}from"./app-Dgsdh8A6.js";const o={};function e(p,s){return l(),n("div",null,s[0]||(s[0]=[a(`<h1 id="直播间人气红包" tabindex="-1"><a class="header-anchor" href="#直播间人气红包"><span>直播间人气红包</span></a></h1><h2 id="获取指定直播间的红包信息" tabindex="-1"><a class="header-anchor" href="#获取指定直播间的红包信息"><span>获取指定直播间的红包信息</span></a></h2><blockquote><p>https://api.live.bilibili.com/xlive/lottery-interface/v1/lottery/getLotteryInfoWeb</p></blockquote><p><em>请求方式：GET</em></p><p>认证方式（可选）：Cookie（SESSDATA）</p><p>如果不携带Cookie信息，user_status将始终返回2（未参与）。</p><p>如果所查询的直播间无红包，popularity_red_pocket为null。</p><p><strong>url参数：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>roomid</td><td>str</td><td>直播间id</td><td>必要</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>0：成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>0：成功</td></tr><tr><td>ttl</td><td>num</td><td>TimeToLive</td><td>正常为1</td></tr><tr><td>data</td><td>object</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>popularity_red_pocket</td><td>array</td><td>人气红包信息</td><td></td></tr><tr><td>……</td><td>......</td><td>……</td><td>……</td></tr></tbody></table><p><code>popularity_red_pocket</code>数组中的对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>lot_id</td><td>num</td><td>红包id</td><td></td></tr><tr><td>sender_uid</td><td>num</td><td>红包发送者uid</td><td></td></tr><tr><td>sender_name</td><td>str</td><td>红包发送者昵称</td><td></td></tr><tr><td>sender_face</td><td>str</td><td>红包发送者头像</td><td></td></tr><tr><td>join_requirement</td><td>num</td><td>参与条件?</td><td></td></tr><tr><td>danmu</td><td>str</td><td>参与红包时自动发送的弹幕内容</td><td></td></tr><tr><td>awards</td><td>array</td><td>红包内容</td><td></td></tr><tr><td>lot_status</td><td>num</td><td>未知</td><td></td></tr><tr><td>h5_url</td><td>str</td><td>红包界面</td><td></td></tr><tr><td>user_status</td><td>num</td><td>用户是否已参与</td><td>1：已参与 2：未参与</td></tr><tr><td>lot_config_id</td><td>num</td><td>未知</td><td></td></tr><tr><td>total_price</td><td>num</td><td>红包总计价格</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><p>查询房间号为24146996的直播间红包信息：</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;"> &#39;https://api.live.bilibili.com/xlive/lottery-interface/v1/lottery/getLotteryInfoWeb?roomid=24146996&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><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>
<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;pk&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;guard&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;gift&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;storm&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;silver&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;activity_box&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;ACTIVITY_ID&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;ACTIVITY_PIC&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">		},</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;danmu&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;anchor&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;red_pocket&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;popularity_red_pocket&quot;</span><span style="color:#D4D4D4;">: [{</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;lot_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">622474</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;sender_uid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1651908873</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;sender_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;九泽糖糖の小蘑菇&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;sender_face&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;http://i0.hdslb.com/bfs/face/c932c5c8b1607fe2e1da22b9780af19662dac939.jpg&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;join_requirement&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;danmu&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;老板大气！点点红包抽礼物！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;awards&quot;</span><span style="color:#D4D4D4;">: [{</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">31212</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;num&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">2</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;打call&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_pic&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://s1.hdslb.com/bfs/live/f75291a0e267425c41e1ce31b5ffd6bfedc6f0b6.png&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">			}, {</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">31214</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;num&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;牛哇&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_pic&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://s1.hdslb.com/bfs/live/23475a7a6170e0d94ba52720e23060dc7604b735.png&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">			}, {</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">31216</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;num&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;i了i了&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">				&quot;gift_pic&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://s1.hdslb.com/bfs/live/1157a445487b39c0b7368d91b22290c60fa665b2.png&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">			}],</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;start_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1645358104</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;end_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1645358284</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;last_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">180</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;remove_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1645358299</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;replace_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1645358294</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;current_time&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1645358231</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;lot_status&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;h5_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://live.bilibili.com/p/html/live-app-red-envelope/popularity.html?is_live_half_webview=1</span><span style="color:#D7BA7D;">\\u0026</span><span style="color:#CE9178;">hybrid_half_ui=1,5,100p,100p,000000,0,50,0,0,1;2,5,100p,100p,000000,0,50,0,0,1;3,5,100p,100p,000000,0,50,0,0,1;4,5,100p,100p,000000,0,50,0,0,1;5,5,100p,100p,000000,0,50,0,0,1;6,5,100p,100p,000000,0,50,0,0,1;7,5,100p,100p,000000,0,50,0,0,1;8,5,100p,100p,000000,0,50,0,0,1</span><span style="color:#D7BA7D;">\\u0026</span><span style="color:#CE9178;">hybrid_rotate_d=1</span><span style="color:#D7BA7D;">\\u0026</span><span style="color:#CE9178;">hybrid_biz=popularityRedPacket</span><span style="color:#D7BA7D;">\\u0026</span><span style="color:#CE9178;">lotteryId=622474&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;user_status&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;lot_config_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">			&quot;total_price&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1600</span></span>
<span class="line"><span style="color:#D4D4D4;">		}],</span></span>
<span class="line"><span style="color:#9CDCFE;">		&quot;activity_box_info&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</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 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 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 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 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 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 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>`,20)]))}const c=t(o,[["render",e]]),d=JSON.parse('{"path":"/docs/live/redpocket.html","title":"直播间人气红包","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1677124138000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":2,"url":"https://github.com/SocialSisterYi"}],"changelog":[{"hash":"f6760f4be38d5b592d396b211e48c666286524de","time":1677124138000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🔨remove header index"},{"hash":"7d89ece2ac46425810647c4ac92acf5f3721cb68","time":1676998806000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🚀调整项目结构"}]},"filePathRelative":"docs/live/redpocket.md"}');export{c as comp,d as data};
