This repository has been archived by the owner on Dec 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from tubone24/openapi
add version api
- Loading branch information
Showing
20 changed files
with
576 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ebook\_homebrew.models package | ||
============================== | ||
|
||
Submodules | ||
---------- | ||
|
||
ebook\_homebrew.models.models module | ||
------------------------------------ | ||
|
||
.. automodule:: ebook_homebrew.models.models | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: ebook_homebrew.models | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ Subpackages | |
|
||
.. toctree:: | ||
|
||
ebook_homebrew.models | ||
ebook_homebrew.utils | ||
|
||
Submodules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
|
||
|
||
<!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>ebook_homebrew.models.models — ebook_homebrew 1.0.0 documentation</title> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script> | ||
|
||
|
||
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script> | ||
|
||
<script type="text/javascript" src="../../../_static/js/theme.js"></script> | ||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> | ||
<link rel="index" title="Index" href="../../../genindex.html" /> | ||
<link rel="search" title="Search" href="../../../search.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
|
||
|
||
<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"> ebook_homebrew | ||
|
||
|
||
|
||
</a> | ||
|
||
|
||
|
||
|
||
<div class="version"> | ||
1.0.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"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../installation.html">Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../overview.html">Overview</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../howtouse.html">How to use</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../restapi.html">Rest API Reference</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../deploy2heroku.html">Deploy to Heroku</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../releasenotes/index.html">Release Notes</a></li> | ||
</ul> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> | ||
|
||
|
||
<nav class="wy-nav-top" aria-label="top navigation"> | ||
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../../../index.html">ebook_homebrew</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> »</li> | ||
|
||
<li><a href="../../index.html">Module code</a> »</li> | ||
|
||
<li>ebook_homebrew.models.models</li> | ||
|
||
|
||
<li class="wy-breadcrumbs-aside"> | ||
|
||
</li> | ||
|
||
</ul> | ||
|
||
|
||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>Source code for ebook_homebrew.models.models</h1><div class="highlight"><pre> | ||
<span></span><span class="sd">"""Provides Rest API models</span> | ||
<span class="sd">"""</span> | ||
|
||
<span class="kn">import</span> <span class="nn">datetime</span> | ||
|
||
|
||
<div class="viewcode-block" id="StatusModel"><a class="viewcode-back" href="../../../ebook_homebrew.models.html#ebook_homebrew.models.models.StatusModel">[docs]</a><span class="k">class</span> <span class="nc">StatusModel</span><span class="p">:</span> | ||
<span class="sd">"""Status Model"""</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">status</span><span class="p">,</span> <span class="n">version</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">status</span> <span class="o">=</span> <span class="n">status</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">version</span> <span class="o">=</span> <span class="n">version</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="UploadModel"><a class="viewcode-back" href="../../../ebook_homebrew.models.html#ebook_homebrew.models.models.UploadModel">[docs]</a><span class="k">class</span> <span class="nc">UploadModel</span><span class="p">:</span> | ||
<span class="sd">"""Upload_id Model"""</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">upload_id</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">upload_id</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">upload_id</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">release_date</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="ErrorModel"><a class="viewcode-back" href="../../../ebook_homebrew.models.html#ebook_homebrew.models.models.ErrorModel">[docs]</a><span class="k">class</span> <span class="nc">ErrorModel</span><span class="p">:</span> | ||
<span class="sd">"""Error Model"""</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">error</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">error</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">error</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">errorDate</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="FileNotFoundModel"><a class="viewcode-back" href="../../../ebook_homebrew.models.html#ebook_homebrew.models.models.FileNotFoundModel">[docs]</a><span class="k">class</span> <span class="nc">FileNotFoundModel</span><span class="p">:</span> | ||
<span class="sd">"""FileNotFound Model"""</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">reason</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">reason</span> <span class="o">=</span> <span class="n">reason</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">errorDate</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span></div> | ||
</pre></div> | ||
|
||
</div> | ||
|
||
</div> | ||
<footer> | ||
|
||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p> | ||
© Copyright 2018, tubone | ||
|
||
</p> | ||
</div> | ||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/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"> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
|
||
|
||
|
||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.