nodeclub/views/static/api.html
2014-10-26 16:00:17 +08:00

60 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id='content'>
<div class='panel'>
<div class='header'>
<ul class='breadcrumb'>
<li><a href='/'>主页</a><span class='divider'>/</span></li>
<li class='active'>API</li>
</ul>
</div>
<div class='inner topic'>
<div class="topic_content">
<%- markdown(multiline(function () {
/*
### 主题
#### /topics 主题首页
接收 get 参数
* page Number 页数
* tab String 主题分类
* limit Number 每一页的主题数量
* mdrender String 当为 `false` 时,不渲染。默认为 `true`
示例:[/api/v1/topics](/api/v1/topics)
#### /topic/:id 主题详情
接收 get 参数
* mdrender String 当为 `false` 时,不渲染。默认为 `true`
示例:[/api/v1/topic/5433d5e4e737cbe96dcef312](/api/v1/topic/5433d5e4e737cbe96dcef312)
### 用户
#### /user/:loginname 用户详情
示例:[/api/v1/user/alsotang](/api/v1/user/alsotang)
#### /accesstoken 验证 accessToken 的正确性
接收 post 参数
* accessToken String 用户的 accessToken
如果成功匹配上用户,会 302 跳转到该用户的 api 详情页。否则 403。
### 知识点
1. 如何获取 accessToken
用户登录后,在设置页面可以看到自己的 accessToken。
建议各移动端应用使用手机扫码的形式登录。
*/
})) %>
</div>
</div>
</div>
</div>