import{_ as e,c as a,b as l,a as d,d as n,e as o,w as r,r as i,o as p}from"./app-Dgsdh8A6.js";const u={};function c(D,s){const t=i("RouteLink");return p(),a("div",null,[s[20]||(s[20]=l("h1",{id:"笔记操作",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#笔记操作"},[l("span",null,"笔记操作")])],-1)),s[21]||(s[21]=l("h2",{id:"保存视频笔记",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#保存视频笔记"},[l("span",null,"保存视频笔记")])],-1)),s[22]||(s[22]=l("blockquote",null,[l("p",null,"https://api.bilibili.com/x/note/add")],-1)),s[23]||(s[23]=l("p",null,[l("em",null,"请求方式：POST")],-1)),s[24]||(s[24]=l("p",null,"认证方式：Cookie（SESSDATA）",-1)),s[25]||(s[25]=l("p",null,[l("strong",null,"正文参数（ application/x-www-form-urlencoded ）：")],-1)),l("table",null,[s[19]||(s[19]=l("thead",null,[l("tr",null,[l("th",null,"参数名"),l("th",null,"类型"),l("th",null,"内容"),l("th",null,"必要性"),l("th",null,"备注")])],-1)),l("tbody",null,[s[6]||(s[6]=l("tr",null,[l("td",null,"oid"),l("td",null,"num"),l("td",null,"目标id"),l("td",null,"必要"),l("td")],-1)),s[7]||(s[7]=l("tr",null,[l("td",null,"oid_type"),l("td",null,"num"),l("td",null,"目标id类型"),l("td",null,"必要"),l("td",null,[l("code",null,"0"),n("视频(oid=avid)")])],-1)),s[8]||(s[8]=l("tr",null,[l("td",null,"note_id"),l("td",null,"num"),l("td",null,"笔记id"),l("td",null,"非必要"),l("td",null,"创建时无需此项")],-1)),s[9]||(s[9]=l("tr",null,[l("td",null,"title"),l("td",null,"str"),l("td",null,"笔记标题"),l("td",null,"必要"),l("td")],-1)),s[10]||(s[10]=l("tr",null,[l("td",null,"summary"),l("td",null,"str"),l("td",null,"笔记预览文本"),l("td",null,"必要"),l("td")],-1)),l("tr",null,[s[2]||(s[2]=l("td",null,"content",-1)),s[3]||(s[3]=l("td",null,"str",-1)),s[4]||(s[4]=l("td",null,"笔记正文json序列",-1)),s[5]||(s[5]=l("td",null,"必要",-1)),l("td",null,[s[1]||(s[1]=n("格式见")),o(t,{to:"/docs/note/#%E9%99%84%E8%A1%A8-%E7%AC%94%E8%AE%B0%E6%AD%A3%E6%96%87%E5%BA%8F%E5%88%97%E6%A0%BC%E5%BC%8F"},{default:r(()=>s[0]||(s[0]=[n("附表")])),_:1,__:[0]})])]),s[11]||(s[11]=l("tr",null,[l("td",null,"tags"),l("td",null,"str"),l("td",null,"笔记跳转标签列表"),l("td",null,"非必要"),l("td")],-1)),s[12]||(s[12]=l("tr",null,[l("td",null,"cls"),l("td",null,"num"),l("td",null,"1"),l("td",null,"非必要"),l("td",null,"作用尚不明确")],-1)),s[13]||(s[13]=l("tr",null,[l("td",null,"from"),l("td",null,"str"),l("td",null,"提交类型"),l("td",null,"非必要"),l("td",null,[l("code",null,"auto"),n("自动提交"),l("br"),l("code",null,"save"),n("手动提交"),l("br"),l("code",null,"close"),n("关闭时自动提交")])],-1)),s[14]||(s[14]=l("tr",null,[l("td",null,"cont_len"),l("td",null,"num"),l("td",null,"正文字数"),l("td",null,"非必要"),l("td")],-1)),s[15]||(s[15]=l("tr",null,[l("td",null,"platform"),l("td",null,"str"),l("td",null,"平台"),l("td",null,"非必要"),l("td",null,[n("可为"),l("code",null,"web")])],-1)),s[16]||(s[16]=l("tr",null,[l("td",null,"publish"),l("td",null,"num"),l("td",null,"是否公开笔记"),l("td",null,"非必要"),l("td",null,[l("code",null,"0"),n("不公开"),l("br"),l("code",null,"1"),n("公开")])],-1)),s[17]||(s[17]=l("tr",null,[l("td",null,"auto_comment"),l("td",null,"num"),l("td",null,"是否添加到评论区"),l("td",null,"非必要"),l("td",null,[l("code",null,"0"),n("不添加"),l("br"),l("code",null,"1"),n("添加")])],-1)),s[18]||(s[18]=l("tr",null,[l("td",null,"csrf"),l("td",null,"str"),l("td",null,"CSRF Token（位于cookie）"),l("td",null,"必要"),l("td")],-1))])]),s[26]||(s[26]=d(`<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><code>0</code>成功 <br><code>-101</code>账号未登录<br><code>-111</code>csrf校验失败<br><code>-400</code>请求错误<br><code>79508</code>该稿件已存在笔记，无法新增<br><code>79513</code>笔记所属视频不合法</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>note_id</td><td>num</td><td>笔记id</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><p>保存内容为加粗的STRONG的笔记<code>3809605586518023</code>于<code>av970322090</code></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:#CE9178;"> &#39;https://api.bilibili.com/x/note/add&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;oid=970322090&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;oid_type=0&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;note_id=3809605586518023&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;title=周刊哔哩哔哩排行榜#543&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;summary=STRONG&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;content=[{&quot;attributes&quot;:{&quot;bold&quot;:true},&quot;insert&quot;:&quot;STRONG&quot;},{&quot;insert&quot;:&quot;\\n&quot;}]&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;tags=&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;cls=1&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;from=save&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">--data-urlencode</span><span style="color:#CE9178;"> &#39;csrf=xxx&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">-b</span><span style="color:#CE9178;"> &#39;SESSDATA=xxx&#39;</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></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;note_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3809605586518023</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><h2 id="删除视频笔记" tabindex="-1"><a class="header-anchor" href="#删除视频笔记"><span>删除视频笔记</span></a></h2><blockquote><p>https://api.bilibili.com/x/note/del</p></blockquote><p><em>请求方式：POST</em></p><p>认证方式：Cookie（SESSDATA）</p><p><strong>正文参数（ application/x-www-form-urlencoded ）：</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>oid</td><td>num</td><td>目标稿件avid</td><td>必要</td><td></td></tr><tr><td>note_id</td><td>num</td><td>笔记id</td><td>非必要</td><td></td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token（位于cookie）</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：成功 <br>-101：账号未登录<br>-111：csrf校验失败<br>-400：请求错误</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></tbody></table><p><strong>示例：</strong></p><p>删除稿件<code>av457253380</code>下的笔记<code>4075968478576647</code></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:#CE9178;"> &#39;https://api.bilibili.com/x/note/del&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;oid=457253380&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;note_id=4075968478576647&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;csrf=xxx&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">-b</span><span style="color:#CE9178;"> &#39;SESSDATA=xxx&#39;</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></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>
<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></div></details>`,22))])}const b=e(u,[["render",c]]),y=JSON.parse('{"path":"/docs/note/action.html","title":"笔记操作","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1706520417000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":2,"url":"https://github.com/SocialSisterYi"},{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":1,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"12e014afcb376e0314e0fdef2dab5c4f7b9fdde7","time":1706520417000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"fix: 错误的显示和链接和数据类型 (#954)"},{"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/note/action.md"}');export{b as comp,y as data};
