{% extends 'bootstrap/base.html' %}
{% import 'bootstrap/fixes.html' as fixes %}

{% block title %}d3cryp7.py{% endblock %}

{% block head %}
{{super()}}
{{fixes.ie8()}}
{% endblock %}

{% block content %}
  <div class="container">
    <div class="jumbotron">
      <h1>Documentation</h1>
      <a href="/" class="btn btn-default btn-sm">
        <span class="glyphicon glyphicon-home"></span>
        <span>Home</span>
      </a>
    </div>
    <!-- These code blocks are cancer. -->
    <!-- I mean, just look at how badly formatted they are. -->
    <!-- Why does such badly formatted code look good when rendered? -->
    <div class="row center-block">
			<h2>Examples</h2>
			<h3>Curl</h3>
			<pre><code>$ curl http://{{ host }}:{{ port }}/api/statistics</pre></code>
			<h3>Python Requests</h3>
			<pre><code>import requests

requests.get('http://{{ host }}:{{ port }}/api/statistics').json()</code></pre>
      <p>The result of these examples is as follows:</p>
      <hr>
      <h2>Version</h2>
      <h3>GET</h3>
      <p>Returns the version of the application</p>
      <pre><code>{
  "version": "0.1.0"
}</code></pre>
      <a href="/api/version">http://{{ host }}:{{ port }}/api/version</a>
      <h2>Statistics</h2>
      <h3>GET</h3>
      <p>Returns statistics about the application and the Python interpreter</p>
      <pre><code>{
  "python": {
    "platform": "linux",
    "version": "3.5.2"
  },
  "d3cryp7": {
    "status_code": 0,
    "version": "0.1.0",
    "status": "RUNNING"
  },
  "time": {
    "running": 289,
    "start": 1475188829,
    "current": 1475189118
  }
}</code></pre>
      <a href="/api/statistics">http://{{ host }}:{{ port }}/api/statistics</a>
    </div>
  </div>
  <footer style="margin-top: 1cm; text-align: center">
    <p>Copyright 2016 Justin Willis</p>
    <a href="https://bitbucket.org/bkvaluemeal/d3cryp7.py" class="btn btn-link" role="button">Bitbucket</a>
  </footer>
{% endblock %}
