30、游戏:游戏收藏
<ul>
<li>收藏游戏列表</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://api.com/api/game/collect/list</code> </li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET</li>
</ul>
<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;">page</td>
<td style="text-align: left;">Y</td>
<td style="text-align: left;">int</td>
<td>页码数: 1</td>
</tr>
<tr>
<td style="text-align: left;">rows</td>
<td style="text-align: left;">Y</td>
<td style="text-align: left;">int</td>
<td>每页记录数: 10</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;code&quot;: 200,
&quot;message&quot;: &quot;&quot;,
&quot;data&quot;: [
{
&quot;id&quot;: &quot;1&quot;,
&quot;name&quot;: &quot;CS:GO&quot;,
&quot;platform&quot;: &quot;tf&quot;,
&quot;gameId&quot;: &quot;1&quot;,
&quot;lootboxGameId&quot;: null,
&quot;imgUrl&quot;: &quot;https://assets.1kuaisudai.com/media/images/game/csgo.png&quot;,
&quot;lootbox&quot;: false,
&quot;hot&quot;: false
},
{
&quot;id&quot;: &quot;2&quot;,
&quot;name&quot;: &quot;Dota 2&quot;,
&quot;platform&quot;: &quot;tf&quot;,
&quot;gameId&quot;: &quot;2&quot;,
&quot;lootboxGameId&quot;: null,
&quot;imgUrl&quot;: &quot;https://assets.1kuaisudai.com/media/images/game/dota2.png&quot;,
&quot;lootbox&quot;: false,
&quot;hot&quot;: false
},
{
&quot;id&quot;: &quot;3&quot;,
&quot;name&quot;: &quot;League of Legends 英雄联盟&quot;,
&quot;platform&quot;: &quot;tf&quot;,
&quot;gameId&quot;: &quot;3&quot;,
&quot;lootboxGameId&quot;: null,
&quot;imgUrl&quot;: &quot;https://assets.1kuaisudai.com/media/images/game/lol.png&quot;,
&quot;lootbox&quot;: false,
&quot;hot&quot;: false
},
{
&quot;id&quot;: &quot;4&quot;,
&quot;name&quot;: &quot;Starcraft II 星际争霸 II&quot;,
&quot;platform&quot;: &quot;tf&quot;,
&quot;gameId&quot;: &quot;4&quot;,
&quot;lootboxGameId&quot;: null,
&quot;imgUrl&quot;: &quot;https://assets.1kuaisudai.com/media/images/game/starcraft2.png&quot;,
&quot;lootbox&quot;: false,
&quot;hot&quot;: false
}
]
}</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;">name</td>
<td style="text-align: left;">string</td>
<td>游戏名称</td>
</tr>
<tr>
<td style="text-align: left;">gameId</td>
<td style="text-align: left;">string</td>
<td>三方游戏ID</td>
</tr>
<tr>
<td style="text-align: left;">lootboxGameId</td>
<td style="text-align: left;">string</td>
<td>三方夺宝游戏ID</td>
</tr>
<tr>
<td style="text-align: left;">platform</td>
<td style="text-align: left;">string</td>
<td>游戏平台</td>
</tr>
<tr>
<td style="text-align: left;">imgUrl</td>
<td style="text-align: left;">string</td>
<td>游戏logo</td>
</tr>
<tr>
<td style="text-align: left;">hot</td>
<td style="text-align: left;">boolean</td>
<td>是否热门</td>
</tr>
<tr>
<td style="text-align: left;">lootbox</td>
<td style="text-align: left;">boolean</td>
<td>是否夺宝</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">long</td>
<td>收藏id</td>
</tr>
</tbody>
</table>
<ul>
<li>收藏游戏</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://api.com/api/game/collect/add</code> </li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<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;">gameId</td>
<td style="text-align: left;">Y</td>
<td style="text-align: left;">long</td>
<td>平台游戏ID(取游戏列表的id,非gameId): 1</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;code&quot;: 200,
&quot;message&quot;: &quot;&quot;
}</code></pre>
<ul>
<li>取消收藏游戏</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://api.com/api/game/collect/del</code> </li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<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;">id</td>
<td style="text-align: left;">Y</td>
<td style="text-align: left;">long</td>
<td>收藏id: 1</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;code&quot;: 200,
&quot;message&quot;: &quot;&quot;
}</code></pre>