yapi/static/doc/usage-创建第一个API.html

233 lines
9.8 KiB
HTML
Raw Normal View History

2017-08-21 21:18:55 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="format-detection" content="telephone=no,email=no" />
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
<meta name="description" content="description of your site">
<meta name="author" content="author of the site">
2017-08-31 11:55:24 +08:00
<title>YApi 使用手册</title>
2017-09-07 18:44:50 +08:00
<link rel="stylesheet" href="source/main.css" />
<link rel="stylesheet" href="styles/theme.css" />
2017-08-21 21:18:55 +08:00
</head>
<body>
<div class="ydoc">
<header class="ydoc-header">
<div class="ydoc-header-area">
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
<button class="ydocIcon navbar-toggle">&#xf020;</button>
<nav class="ydoc-nav">
<ul class="navbar-left">
<li class="">
<a href="index.html">首页</a>
</li>
<li class="active">
2017-08-31 11:55:24 +08:00
<a href="usage.html">使用手册</a>
</li>
2017-08-21 21:18:55 +08:00
<li class="">
<a href="api.html"></a>
</li>
</ul>
</nav>
</div>
</header>
<!-- <header style="height:20px"></header> -->
<!-- Docs page layout -->
<div class="ydoc-banner-bg">
<div class="ydoc-banner ">
<div class="ydoc-banner-area">
<h1 >YApi</h1>
2017-09-01 15:59:53 +08:00
<p class="desc ">高效、易用、功能强大的api管理平台旨在为开发、产品、测试人员提供更优雅的接口管理服务。</p>
2017-08-21 21:18:55 +08:00
</div>
</div>
<div class="ydoc-container">
2017-09-07 18:44:50 +08:00
<div class="ydoc-container-content ">
2017-08-21 21:18:55 +08:00
2017-08-30 15:53:48 +08:00
2017-09-07 18:44:50 +08:00
<div class="content-left staticsidenav" role="complementary">
2017-08-30 15:53:48 +08:00
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
<ul class="nav docs-sidenav">
<!-- <li > -->
<li >
2017-08-31 11:55:24 +08:00
<a href="usage-认识 YApi.html">认识 YApi</a>
</li>
<!-- <li class="active" class="active" > -->
<li class="active" >
<a href="usage-创建第一个API.html">创建第一个API</a>
2017-08-30 15:53:48 +08:00
</li>
<ul class="nav docs-sidenav-extend" >
<li >
2017-09-06 10:36:11 +08:00
<a href="#获取权限">获取权限</a>
2017-09-05 17:06:50 +08:00
</li>
<li >
2017-09-06 10:36:11 +08:00
<a href="#选择项目">选择项目</a>
2017-09-05 17:06:50 +08:00
</li>
<li >
2017-09-06 10:36:11 +08:00
<a href="#新建接口">新建接口</a>
2017-08-30 15:53:48 +08:00
</li>
2017-08-31 11:55:24 +08:00
2017-08-30 15:53:48 +08:00
</ul>
2017-08-31 11:55:24 +08:00
2017-09-04 11:50:36 +08:00
<!-- <li > -->
<li >
2017-09-06 15:40:45 +08:00
<a href="usage-管理分组与项目.html">管理分组与项目</a>
2017-09-04 11:50:36 +08:00
</li>
<!-- <li > -->
<li >
2017-09-06 15:40:45 +08:00
<a href="usage-项目操作.html">项目操作</a>
</li>
<!-- <li > -->
<li >
<a href="usage-接口操作.html">接口操作</a>
2017-09-04 11:50:36 +08:00
</li>
2017-08-31 11:55:24 +08:00
<!-- <li > -->
<li >
<a href="usage-使用mock功能.html">使用mock功能</a>
</li>
2017-09-04 11:50:36 +08:00
<!-- <li > -->
<li >
<a href="usage-使用测试集.html">使用测试集</a>
</li>
2017-08-31 11:55:24 +08:00
2017-08-30 15:53:48 +08:00
</ul>
</nav>
</div>
2017-09-07 18:44:50 +08:00
<div class="content-right markdown-body use-sidebar" role="main">
2017-08-30 15:53:48 +08:00
2017-09-05 17:06:50 +08:00
<h3 class="subject" id="如何创建项目?">如何创建项目? <a class="hashlink" href="#如何创建项目?">#</a></h3><p>把大象装进冰箱分几步?三步:把冰箱门打开,把大象装进去,关门,搞定~</p>
<p>新建接口分几步?也是三步:</p>
<ul>
2017-09-06 10:36:11 +08:00
<li><a href="#获取权限">获取权限</a></li><li><a href="#选择项目">找到一个项目</a></li><li><a href="#新建_编辑接口">新建接口</a></li></ul>
2017-09-05 17:06:50 +08:00
<p>搞定~</p>
2017-09-06 10:36:11 +08:00
<h2 class="subject" id="获取权限">获取权限 <a class="hashlink" href="#获取权限">#</a></h2><ul>
<li>登录后查看项目,如果找不到对应分组或项目,需要联系组长获取项目权限。</li></ul>
2017-09-05 17:06:50 +08:00
<h2 class="subject" id="选择项目">选择项目 <a class="hashlink" href="#选择项目">#</a></h2><ul>
<li><p>如果你已经登录,会在首页右侧看到一些项目 (可以在左侧的分组列表切换分组来查看不同分组下的项目)。</p>
</li><li><p>点击一个项目,进入该项目的详情页。</p>
2017-08-31 11:55:24 +08:00
</li></ul>
2017-09-05 17:06:50 +08:00
<blockquote>
<p>如果没有找到项目,请联系组长</p>
</blockquote>
<p><img src="./images/project_list.png" width = "800" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
<h2 class="subject" id="新建接口">新建接口 <a class="hashlink" href="#新建接口">#</a></h2><ul>
<li>点击左侧接口分组右侧的菜单按钮,选择 <code>添加接口</code>,或者点击接口列表右上角的 <code>添加接口</code></li></ul>
<p><img src="./images/usage/api_add_btn.png" /></p>
<ul>
2017-09-06 10:36:11 +08:00
<li>选择接口分类,输入接口名称和接口路径,点击 <code>提交</code></li></ul>
2017-09-05 17:06:50 +08:00
<p><img src="./images/usage/api_add_panel.png" /></p>
2017-09-06 10:36:11 +08:00
<blockquote>
<p>如果没有新建项目权限,请联系组长</p>
</blockquote>
<ul>
<li>恭喜你创建了第一个YApi的接口你可以看到在左侧看到接口名称右侧有该接口的信息预览。</li></ul>
<p><img src="./images/usage/api_res.png" /></p>
2017-08-21 21:18:55 +08:00
2017-08-30 15:53:48 +08:00
</div>
2017-08-21 21:18:55 +08:00
</div>
</div>
</div>
<footer class="footer">
<div class="copyright">
&copy; 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
</div>
</footer>
</div>
2017-08-30 15:53:48 +08:00
<div class="open-panel"></div>
<div class="mask"></div>
2017-08-21 21:18:55 +08:00
<script src="source/main.js"></script>
<script src="source/app.js"></script>
<script>
2017-09-07 18:44:50 +08:00
var lineHeight = 18;
2017-08-21 21:18:55 +08:00
var EXAMPLE_MAX_HEIGHT;
function fold() {
// 折叠code
$('.markdown-body pre').css({
"line-height": lineHeight + "px"
});
$('.markdown-body pre').map(function(i, item) {
var $item = $(item);
var foldnumber = $item.data('foldnumber');
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
$item.css({
"padding-bottom": 30
});
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
$item.append('<span class="extend">展开更多……</span>');
};
});
$('.ydoc-example').delegate('.extend', 'click', function() {
var $this = $(this);
$this.removeClass('extend').addClass('fold');
$this.html('折叠代码');
2017-09-07 18:44:50 +08:00
$this.parent().children('.js-code').height('auto');
$this.parent().height('auto');
2017-08-21 21:18:55 +08:00
});
$('.ydoc-example').delegate('.fold', 'click', function() {
var $this = $(this);
var foldnumber = $this.parent().data('foldnumber');
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
$this.removeClass('fold').addClass('extend');
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
2017-09-07 18:44:50 +08:00
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
2017-08-21 21:18:55 +08:00
$this.html("展开更多……");
});
}
$(document).ready(fold);
</script>
</body>
</html>