2013-04-17 17:24:07 +02:00
{% extends "zephyr/portico.html" %}
{# API information page #}
Reuse minified JS from previous deploys
This is a big change affecting lots of areas:
* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
update-prod-static, is used to copy minified JS from a previous
deploy (i.e., a previous git checkout), if the source files have
not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
than Pipeline's compressed_js
Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.
Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.
(Based on code review, this commit has been revised to:
* Warn if git returns an error in minify-js
* Add missing output redirects in update-prod-static
* Use DEPLOY_ROOT instead of manually constructing that directory
* Use old style formatting)
(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-03 22:42:25 +02:00
{% load minified_js %}
2013-04-17 17:24:07 +02:00
{% block customhead %}
{{ block.super }}
Reuse minified JS from previous deploys
This is a big change affecting lots of areas:
* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
update-prod-static, is used to copy minified JS from a previous
deploy (i.e., a previous git checkout), if the source files have
not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
than Pipeline's compressed_js
Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.
Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.
(Based on code review, this commit has been revised to:
* Warn if git returns an error in minify-js
* Add missing output redirects in update-prod-static
* Use DEPLOY_ROOT instead of manually constructing that directory
* Use old style formatting)
(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-03 22:42:25 +02:00
{% minified_js 'api' %}
2013-04-17 17:24:07 +02:00
{% endblock %}
{% block portico_content %}
< div class = "row-fluid" >
< div class = "span8" >
< h1 > API endpoints documentation< / h1 >
< ul class = "breadcrumb" >
< li > < a href = "/" > Home< / a > < span class = "divider" > /< / span > < / li >
< li > < a href = "/api" > API< / a > < span class = "divider" > /< / span > < / li >
< li class = "active" > Endpoints< / li >
< / ul >
2013-04-19 18:19:11 +02:00
< p > In addition to our < a href = "/api" > pre-built API bindings for Python< / a > , we also have a < a href = "http://en.wikipedia.org/wiki/Representational_state_transfer" > REST-ful< / a > web API.< / p >
2013-04-17 17:24:07 +02:00
< ul class = "nav nav-tabs" id = "api-example-tabs" >
< li class = "active" > < a href = "#curl" data-toggle = "tab" data-class = "curl" > curl< / a > < / li >
< li > < a href = "#python" data-toggle = "tab" data-class = "python" > Python< / a > < / li >
< / ul >
{% autoescape off %}
{% for blurb in content %}
2013-06-19 23:46:11 +02:00
< div class = "api-block" >
2013-04-17 17:24:07 +02:00
< h2 class = "call" > {{ blurb.call }}< / h2 >
< div class = "endpoint" > < code > {{ blurb.endpoint }}< / code > < / div >
< div class = "api-details" >
< h3 > Arguments< / h3 >
< dl class = "dl-horizontal arguments" >
{% for argument in blurb.arguments %}
< dt > < code > {{ argument.0 }}< / code > < / dt >
< dd > {{ argument.1 }}< / dd >
{% endfor %}
< / dl >
< h3 > Return values< / h3 >
< dl class = "dl-horizontal returns" >
{% for return in blurb.returns %}
< dt > < code > {{ return.0 }}< / code > < / dt >
< dd > {{ return.1 }}< / dd >
{% endfor %}
< / dl >
{%if blurb.example_request %}
< h3 > Example request< / h3 >
{% for lang, req in blurb.example_request.items %}
< div class = "example_request {{ lang }}" >
{{ req }}
< / div >
{% endfor %}{% endif %}
{%if blurb.example_response %}
< h3 > Example response< / h3 >
< div class = "example_response" >
{{ blurb.example_response }}
< / div >
{% endif %}
< / div >
< / div >
{% endfor %}
{% endautoescape %}
< / div >
< / div >
{% endblock %}