Skip to content

Commit

Permalink
replace html markup with textile
Browse files Browse the repository at this point in the history
  • Loading branch information
iartarisi committed Sep 21, 2012
1 parent 885a33e commit cac156d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions popcorn/templates/api.html
@@ -1,8 +1,10 @@
{% extends "layout.html" %}

{% block content %}
{% filter textile %}

h2. The Popcorn API

<h2>The Popcorn API</h2>
<div class="alert alert-block">
<h4>Warning!</h4> The API is currently unstable and may change
without prior notice. If you're looking to use Popcorn data in your
Expand All @@ -11,17 +13,17 @@ <h4>Warning!</h4> The API is currently unstable and may change
</div>


<h3>Making new package submissions</h3>
<p>Popcorn provides one API function for receiving submissions from users. This is available at the root (<code>'/'</code>) of the Popcorn website and accepts only HTTP POST requests. Gzip archived (<code>Content-Encoding: gzip</code>) requests are also accepted.</p>
h3. Making new package submissions

Popcorn provides one API function for receiving submissions from users. This is available at the root (@'/'@) of the Popcorn website and accepts only HTTP POST requests. Gzip archived (@Content-Encoding: gzip@) requests are also accepted.

<p>The format of a submission is plaintext and contains general information about the system as well as information about each package installed on that system. The popcorn client is a python package which currently fills this role for rpm-based distros.</p>
The format of a submission is plaintext and contains general information about the system as well as information about each package installed on that system. The popcorn client is a python package which currently fills this role for rpm-based distros.</p>

<h3>JSON API</h3>
h3. JSON API

<p>Aside from the submission receiving API function, all other API requests are HTTP GET requests which return JSON documents. You need to explicitly specify that you want a JSON document in your request's headers. e.g.</p>
Aside from the submission receiving API function, all other API requests are HTTP GET requests which return JSON documents. You need to explicitly specify that you want a JSON document in your request's headers. e.g.

<pre>
curl --header "Accept: application/json" localhost:5000/distro/openSUSE_12.1
pre. curl --header "Accept: application/json" http://popcorn.opensuse.org/distro/openSUSE_12.1
{
"distro": {
"submissions": [
Expand All @@ -45,9 +47,9 @@ <h3>JSON API</h3>
"distro_name": "openSUSE",
"distro_version": "12.1"
}
</pre>

<h3>Errors</h3>

h3. Errors

{% endfilter %}
{% endblock %}

0 comments on commit cac156d

Please sign in to comment.