为用户开启(或关闭)玩瞳资源库
<p><strong>服务:</strong>api-cloud
<strong>API: </strong><code>cloud-api1.51wanxue.com/api-cloud/user/operationRepo</code>
<strong>请求方式:</strong>POST
<strong>入参方式:</strong> Body raw方式
<strong>api开发者:</strong> 观李
<strong>是否授权登录:</strong> 是
<strong>简要描述:</strong>
调用该接口时需授权登录,
将玩瞳资源库设置为用户授权模式,对该资源库的这种模式进行开关,
请求方式为post请求,请求数据放入body,以application/json格式传输</p>
<p><strong>参数:</strong></p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>token,该参数需要放在请求头部</td>
</tr>
<tr>
<td style="text-align: left;">openId</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>用户的openId</td>
</tr>
<tr>
<td style="text-align: left;">repoId</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>要操作的资源库id</td>
</tr>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">int</td>
<td>操作类型,开关资源库模式,1开,2关</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong>:
1.参数是json对象。</p>
<p><strong>返回示例</strong></p>
<pre><code class="language-json">入参示例
{
&quot;openId&quot;:&quot;12321423423&quot;,
&quot;repoId&quot;:27,
&quot;type&quot;:1
}
操作成功示例
{
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;ok&quot;,
&quot;data&quot;: null
}
操作失败示例
{
&quot;code&quot;: 100500,
&quot;msg&quot;: &quot;operation resource library failed&quot;,
&quot;data&quot;: null
}</code></pre>
<p><strong>返回数据参数说明 </strong></p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td>请求返回码 0(表示成功)</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">String</td>
<td>系统返回提示</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">Object</td>
<td>返回数据</td>
</tr>
</tbody>
</table>