10-summary.html 8.08 KB


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>1. 概述 &mdash; code_serv 1.0 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="code_serv 1.0 documentation" href="index.html"/>
        <link rel="next" title="2. 数据库设计" href="20-db.html"/>
        <link rel="prev" title="公共编码服务" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> code_serv
          

          
          </a>

          
            
            
              <div class="version">
                1.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. 概述</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#id2">1.1. 概述</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id3">1.2. 术语</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id4">1.3. 关于接口返回内容的统一说明</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a></li>
<li class="toctree-l1"><a class="reference internal" href="30-api-simple.html">3. 简单编码接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="40-api-event.html">4. 事件分类编码接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="41-api-place.html">5. 地区类型编码接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="42-api-traffic.html">6. 交通相关分类编码接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="50-api-custom.html">7. 自定义编码接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="99-history.html">8. 修订历史</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">code_serv</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>1. 概述</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/10-summary.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="id1">
<h1>1. 概述<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<div class="section" id="id2">
<h2>1.1. 概述<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<blockquote>
<div>本服务用于为平台的各项服务提供统一的编码。</div></blockquote>
</div>
<div class="section" id="id3">
<h2>1.2. 术语<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h2>
<blockquote>
<div><ul class="simple">
<li>编码:对常用的公共内容进行编码。</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="id4">
<h2>1.3. 关于接口返回内容的统一说明<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h2>
<ol class="arabic simple">
<li>采用标准HTTP返回状态码向接口调用者指出操作是否成功,例如2xx均表示成功,4xx和5xx表示失败。</li>
<li>对于HTTP返回状态码2xx的情况,本文档各个接口分别规定了其响应内容的格式(即Response Body规定的格式)。</li>
<li>对于HTTP返回状态码非2xx的情况,可以不返回任何响应内容,即不含有Response Body。但是也可以返回一个以下格式的Response Body向调用者给出更详细的错误指示:</li>
</ol>
<blockquote>
<div><div class="line-block">
<div class="line">{</div>
<div class="line-block">
<div class="line">“ecode”: 0,                           # 整数类型,是平台自定义的错误码</div>
<div class="line">“enote”: “The camera is created ok.”  # 字符串,关于错误的说明</div>
</div>
<div class="line">}</div>
</div>
</div></blockquote>
<ol class="arabic" start="4">
<li><p class="first">关于GET请求的统一参数的说明:</p>
<blockquote>
<div><blockquote>
<div><p>GET请求一般来说至少需要支持以下四个参数:</p>
</div></blockquote>
<ul class="simple">
<li>offset:      本次返回列表项的起始偏移量,用于分页,不出现为0</li>
<li>limit:       本次返回列表项的最大数量,用于分页,不出现为30</li>
<li>order:       排序方向,asc表示升序,desc表示降序,不出现为desc</li>
<li>sortby:      排序关键字,由各个接口决定,参见各个接口说明。</li>
</ul>
</div></blockquote>
</li>
</ol>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="20-db.html" class="btn btn-neutral float-right" title="2. 数据库设计" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="index.html" class="btn btn-neutral" title="公共编码服务" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2017, Yuan Chao.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'1.0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>