fix: message api doc
This commit is contained in:
parent
465a3a67a5
commit
8ad087820e
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
* @Date: 2021-03-01 10:35:21
|
||||
* @LastEditors: viletyy
|
||||
* @LastEditTime: 2021-09-10 16:07:14
|
||||
* @LastEditTime: 2021-09-13 17:54:51
|
||||
* @FilePath: /forgeplus/app/docs/slate/source/includes/_users.md
|
||||
-->
|
||||
# Users
|
||||
|
@ -83,6 +83,7 @@ await octokit.request('GET /api/users/:login/messages.json')
|
|||
|messages.content | string | 消息内容 |
|
||||
|messages.notification_url | string | 消息跳转地址 |
|
||||
|messages.source | string | 消息来源 |
|
||||
|messages.timeago | string | 消息时间 |
|
||||
|messages.type | string | 消息类型,notification为系统消息,atme为@我消息|
|
||||
|sender | object | 消息发送者 |
|
||||
|
||||
|
@ -197,7 +198,7 @@ await octokit.request('GET /api/users/:login/messages.json')
|
|||
</aside>
|
||||
|
||||
## 发送消息
|
||||
发送消息
|
||||
发送消息, 目前只支持atme
|
||||
|
||||
> 示例:
|
||||
|
||||
|
@ -217,7 +218,20 @@ await octokit.request('POST /api/users/:login/messages.json')
|
|||
--------- | ----------- | -----------
|
||||
|type | string | 消息类型 |
|
||||
|recervers_login | array | 需要发送消息的用户名数组|
|
||||
|content | string | 消息内容 |
|
||||
|atmeable_type | string | atme消息对象,是从哪里@我的,比如评论:Journal |
|
||||
|atmeable_id | integer | atme消息对象id |
|
||||
|
||||
> 请求的JSON示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "atme",
|
||||
"receivers_login": ["yystopf", "testforge1"],
|
||||
"atmeable_type": "Journal",
|
||||
"atmeable_id": 67
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
> 返回的JSON示例:
|
||||
|
||||
|
|
|
@ -921,7 +921,7 @@ Success — a happy kitten is an authenticated kitten!
|
|||
<!--
|
||||
* @Date: 2021-03-01 10:35:21
|
||||
* @LastEditors: viletyy
|
||||
* @LastEditTime: 2021-09-10 16:07:14
|
||||
* @LastEditTime: 2021-09-13 17:54:51
|
||||
* @FilePath: /forgeplus/app/docs/slate/source/includes/_users.md
|
||||
-->
|
||||
<h1 id='users'>Users</h1><h2 id='1ae74893b1'>获取当前登陆用户信息</h2>
|
||||
|
@ -1076,6 +1076,11 @@ Success — a happy kitten is an authenticated kitten!
|
|||
<td>消息来源</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>messages.timeago</td>
|
||||
<td>string</td>
|
||||
<td>消息时间</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>messages.type</td>
|
||||
<td>string</td>
|
||||
<td>消息类型,notification为系统消息,atme为@我消息</td>
|
||||
|
@ -1290,7 +1295,7 @@ Success — a happy kitten is an authenticated kitten!
|
|||
Success Data.
|
||||
</aside>
|
||||
<h2 id='94306b2fc3'>发送消息</h2>
|
||||
<p>发送消息</p>
|
||||
<p>发送消息, 目前只支持atme</p>
|
||||
|
||||
<blockquote>
|
||||
<p>示例:</p>
|
||||
|
@ -1318,12 +1323,27 @@ Success — a happy kitten is an authenticated kitten!
|
|||
<td>需要发送消息的用户名数组</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>content</td>
|
||||
<td>atmeable_type</td>
|
||||
<td>string</td>
|
||||
<td>消息内容</td>
|
||||
<td>atme消息对象,是从哪里@我的,比如评论:Journal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>atmeable_id</td>
|
||||
<td>integer</td>
|
||||
<td>atme消息对象id</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<blockquote>
|
||||
<p>请求的JSON示例:</p>
|
||||
</blockquote>
|
||||
<div class="highlight"><pre class="highlight json tab-json"><code><span class="p">{</span><span class="w">
|
||||
</span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"atme"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"receivers_login"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"yystopf"</span><span class="p">,</span><span class="w"> </span><span class="s2">"testforge1"</span><span class="p">],</span><span class="w">
|
||||
</span><span class="nl">"atmeable_type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Journal"</span><span class="p">,</span><span class="w">
|
||||
</span><span class="nl">"atmeable_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">67</span><span class="w">
|
||||
</span><span class="p">}</span><span class="w">
|
||||
</span></code></pre></div>
|
||||
<blockquote>
|
||||
<p>返回的JSON示例:</p>
|
||||
</blockquote>
|
||||
|
|
Loading…
Reference in New Issue